You should add AccountType property to Account class. There are two ways:
Making Account class abstract:
abstract class Account
{
public abstract string AccountType { get; }
}
class SavingsAccount : Account
{
public override string AccountType
{
get { return "Savings Account"; }
}
}
class CreditAccount : Account
{
public override string AccountType
{
get { return "Credit Account"; }
}
}
Or making AccountType property virtual:
class Account
{
public virtual string AccountType { get { return string.Empty; } }
}
class SavingsAccount : Account
{
public override string AccountType
{
get { return "Savings Account"; }
}
}
class CreditAccount : Account
{
public override string AccountType
{
get { return "Credit Account"; }
}
}
This would make sense if Account should be instantiated on its own and can provide a valid implementation for AccountType property. Otherwise you should go with the abstract class.