예제 #1
0
        static void Main(string[] args)
        {
            SuperHuman superHuman = new SuperHuman("Captain America");

            superHuman.Powers.Add(new Power("Shield", 50));
            superHuman.DisplayPowers();
            superHuman.Powers.Add(new Power("Iron Suit", 50));
            superHuman.Powers.Add(new Power("Hammer", 45));
            Console.WriteLine(superHuman.ToString());
        }
예제 #2
0
        static void Main(string[] args)
        {
            SuperHuman superHuman = new SuperHuman("Super Dude");

            superHuman.AddPower("Spider Climbing", 50);
            superHuman.AddPower("Webcasting", 40);
            Console.WriteLine(superHuman.ToString());
            SuperVillian superVillian = new SuperVillian("Baddie McBaddington", 9001);

            superVillian.AddPower("Malevolent Stare", 420);
            superVillian.AddPower("Imminent Betrayal", 69);
            Console.WriteLine(superVillian.ToString());
        }