示例#1
0
        public void ShowWing(Wing wingToShow)
        {
            string answer = Program.GetUserResponse($"\nwould you like to see our {wingToShow.Name}?\n");

            if (Program.YesOrNO(answer))
            {
                foreach (Exhibit exhibit in wingToShow.Exhibits)
                {
                    exhibit.ShowExhibit();
                }
            }
        }
示例#2
0
        public static void Main(string[] args)
        {
            Console.BackgroundColor = ConsoleColor.DarkBlue;
            Console.ForegroundColor = ConsoleColor.White;

            Exhibit bullShark = new Exhibit("Bull Shark", 1, false);

            bullShark.Descriptions.Add(File.ReadAllText("Bull Shark Facts.txt"));
            Exhibit tigerShark = new Exhibit("Tiger Shark", 2, false);

            tigerShark.Descriptions.Add(File.ReadAllText("Tiger Shark Facts.txt"));
            Exhibit hammerheadShark = new Exhibit("Hammerhead Shark", 3, true);

            hammerheadShark.Descriptions.Add(File.ReadAllText("Hammerhead Shark Facts.txt"));
            Wing sharkWing = new Wing("Shark Wing", bullShark, tigerShark, hammerheadShark);

            Exhibit clownFish = new Exhibit("Clownfish", 5, false);

            clownFish.Descriptions.Add(File.ReadAllText("Clownfish Facts.txt"));
            Exhibit lionFish = new Exhibit("Lionfish", 1, false);

            lionFish.Descriptions.Add(File.ReadAllText("Lionfish Facts.txt"));
            Exhibit pufferFish = new Exhibit("PufferFish", 2, false);

            pufferFish.Descriptions.Add(File.ReadAllText("Pufferfish Facts.txt"));
            Exhibit yellowTang = new Exhibit("Yellow Tang", 4, false);

            yellowTang.Descriptions.Add(File.ReadAllText("Yellow Tang Facts.txt"));
            Wing tropicalfishWing = new Wing("Tropical Fish Wing", clownFish, lionFish, pufferFish, yellowTang);

            Exhibit seaUrchin = new Exhibit("Sea Urchin", 3, false);

            seaUrchin.Descriptions.Add(File.ReadAllText("Sea Urchin Facts.txt"));
            Exhibit lobster = new Exhibit("Lobster", 8, false);

            lobster.Descriptions.Add(File.ReadAllText("Lobster Facts.txt"));
            Exhibit octopus = new Exhibit("Octopus", 1, false);

            octopus.Descriptions.Add(File.ReadAllText("Octopus Facts.txt"));
            Wing shellfishwing = new Wing("Shellfish Wing", lobster, seaUrchin, octopus);

            TourGuide tourGuide = new TourGuide();

            tourGuide.Name = "Willy Freeman";

            Visitor newVisitor = new Visitor();

            newVisitor.Name = tourGuide.WelcomeVisitor(newVisitor);

            string answer = GetUserResponse("Would you like to start the tour?\n");

            if (YesOrNO(answer))
            {
                tourGuide.ShowWing(sharkWing);
                tourGuide.ShowWing(tropicalfishWing);
                tourGuide.ShowWing(shellfishwing);
                tourGuide.EndOfTour(newVisitor);
            }
            else
            {
                tourGuide.VisitorSaysNo(newVisitor);
            }

            tourGuide.WishFarewell(newVisitor);

            Console.ReadLine();
        }