示例#1
0
        static void Main(string[] args)
        {
            Patient        jaime         = new Patient("Jaime", "patient");
            Upholsterer    fred          = new Upholsterer("Fred", "upholsterer");
            FootballPlayer russellWilson = new FootballPlayer("Russell Wilson", "football player");

            WriteLine(jaime.Name + "'s curent status as a " + jaime.Type + ": " + jaime.Recovery());
            WriteLine(fred.Name + "'s curent status as a " + fred.Type + ": " + fred.Recovery());
            WriteLine(russellWilson.Name + "'s curent status as a " + russellWilson.Type + ": " + russellWilson.Recovery());
        }
示例#2
0
        static void Main(string[] args)
        {
            Patient patient = new Patient();

            patient.Recover();
            Upholsterer upholsterer = new Upholsterer();

            upholsterer.Recover();
            FootballPlayer player = new FootballPlayer();

            player.Recover();
        }