public override string ToString() { string output = String.Format("{0} is a {1} and has the following abilities:", Name, category.ToString()); if (CanFly) { output += String.Format("\n\t- can fly and the maximum speed of flying is : {0}", MaxSpeedFlying); } if (CanWalk) { output += String.Format("\n\t- can walk and the maximum speed of walking is : {0}", MaxSpeedWalking); } if (CanSwim) { output += String.Format("\n\t- can swim and the maximum speed of swimming is : {0}", MaxSpeedSwimming); } if (CanCrawl) { output += String.Format("\n\t- can crawl, and the maximum speed of crawling is : {0}", MaxSpeedCrawling); } return(output); }