Esempio n. 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Bicycles, woodworking, music, and video games. These are a few of my favorite things.  How about you?");
            var redBike = new Bike("red");

            redBike.HasPedals = true;
            redBike.BikeColor();
            redBike.Ride();

            var mountainBike = new Bike("blue");

            mountainBike.BikeColor();
            mountainBike.Ride();

            Console.WriteLine("Do you like to woodwork?");
            var woodworker = new Woodwork();

            woodworker.Build();
            woodworker.UsePowerTools();

            var craftsman = new Woodwork();

            woodworker.Build();
            woodworker.UsePowerTools();

            var musician = new playMusic();

            musician.Preference();
            musician.Instrument();

            var gamer = new VideoGames();

            gamer.likesGames();
            gamer.GameSystem();

            var gamester = new VideoGames();

            gamester.likesGames();
            gamester.GameSystem();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var jericho = new Snake("Jericho", "Boa Constrictor");

            jericho.FeedReptile();
            jericho.Speak();
            jericho.Slither();

            var rogue = new Iguana("Rogue", "Green Iguana");

            rogue.FeedReptile();
            rogue.Speak();
            rogue.Dislike();

            var snuggles = new Alligator("Snuggles", "American Alligator");

            snuggles.FeedReptile();
            snuggles.Speak();
            snuggles.DeathRoll();

            var fgfc820 = new Industrial("FGFC820", "Aggrotech")
            {
                AlbumNumber = 10
            };

            fgfc820.RockOut("Bridgestone Arena");
            fgfc820.CheckAlbums();
            fgfc820.Bringit();

            var vnvNation = new Industrial("VNV Nation", "EBM")
            {
                AlbumNumber = 20
            };

            vnvNation.RockOut("Exit/In");
            vnvNation.CheckAlbums();
            vnvNation.Bringit();

            var bach = new Classical("Johan Sebestian Bach", "Baroque");

            bach.Encore();

            var theGrapesOfWrath = new Novel("The Grapes of Wrath", 525, "John Steinbeck")
            {
                HaveRead = true
            };

            theGrapesOfWrath.Open();
            theGrapesOfWrath.Read();

            var braveNewWorld = new Novel("Brave New World", 452, "Aldous Huxley")
            {
                HaveRead = false
            };

            braveNewWorld.Read();

            var verdi = new PictureBook("Verdi", 15, "Janell Cannon");

            verdi.Read();

            var worldOfWarcraft = new VideoGames("World of Warcraft", new DateTime(2004, 11, 24))
            {
                Developer = "Blizzard",
                GameGenre = GameGenre.MMO
            };

            worldOfWarcraft.Play();
            worldOfWarcraft.Return();

            var doom = new VideoGames("Doom", new DateTime(1993, 12, 10))
            {
                Developer = "id Software",
                GameGenre = GameGenre.Shooter
            };

            doom.Play();
            doom.Return();

            Console.ReadKey();
        }