public abstract class Animal
protected string Color { get; set; }
protected bool IsFish { get; set; }
public Animal(string color, bool isFish) {
public abstract void DisplayInformation();
public class Mouse : Animal {
private float TailLength { get; set; }
public Mouse(string color) :
public void SetTailLength(float length) {
this.TailLength = length;
public override void DisplayInformation() {
Console.WriteLine(string.Format("This is a {0} mouse and it is{1} a fish. Its tail is {2} inches long.", this.Color, !this.IsFish ? " not" : string.Empty, this.TailLength));
public class Goldfish : Animal {
private int Age { get; set; }
public Goldfish(string color) :
public void SetAge(int age) {
public override void DisplayInformation() {
Console.WriteLine(string.Format("This is a {0} goldfish and it is{1} a fish. It is {2} years old.", this.Color, !this.IsFish ? " not" : string.Empty, this.Age));
public static void Main()