Esempio n. 1
0
        public static void Check()
        {
            SpeakHello.Hello();

            Console.WriteLine("Have you any liquid volume of more than 100 ml? (yes/no)");
            bool unswer1 = Console.ReadLine().ToUpper().Equals("YES") ? false : true;

            if (!unswer1)
            {
                Console.WriteLine("It can not be taken on board. Turn in the baggage?");
                bool unswer11 = Console.ReadLine().ToUpper().Equals("YES") ? true : false;
                if (!unswer11)
                {
                    Console.WriteLine("You can not fly");
                    return;
                }
            }

            Console.WriteLine("Have you something forbidden?");
            bool unswer2 = Console.ReadLine().ToUpper().Equals("YES") ? true : false;

            if (unswer2)
            {
                Console.WriteLine("You are detained!");
                return;
            }
            else
            {
                Console.WriteLine("Good flight!");
            }
        }
Esempio n. 2
0
        public static void Check()
        {
            SpeakHello.Hello();

            Initialisers.FullNameInitialiser();
            FullName fullName = new FullName(name, surname, patronymic);

            Initialisers.PassportInitialiser();
            Passport passport = new Passport(series, numPassport);

            Initialisers.FlightInitialiser();
            Flight flight = new Flight(country, date, weightBaggage);

            Console.WriteLine();

            Console.WriteLine("The information about your flight:");
            Console.WriteLine();

            fullName.FullNameToString();
            Console.WriteLine();

            passport.PassportToString();
            Console.WriteLine();

            flight.FlightInformationToString();
        }