Example #1
0
        public void CheckLuggage(Human human)
        {
            Console.WriteLine("Do you have a luggage?");
            if (String.Equals(Console.ReadLine().ToString().ToLower(), "no"))
            {
                Console.WriteLine("Have a successful flight.");
            }
            else
            {
                Console.WriteLine("Enter a weight of luggage from libra.");
                double  mass    = Convert.ToDouble(Console.ReadLine());
                Luggage luggage = new Luggage(mass);

                if (mass <= 10.0)
                {
                    luggage.IsHandLuggage = true;
                    Console.WriteLine("You have the hand luggage.");
                }
                else
                {
                    Console.WriteLine("You have the luggage.");
                }

                human.Luggage = luggage;
            }
        }
Example #2
0
 public Human(string _firstName, string _secondName, Passport _pasport, Luggage _luggage)
 {
     firstName  = _firstName;
     secondName = _secondName;
     pasport    = _pasport;
     luggage    = _luggage;
     withTicket = false;
 }
Example #3
0
        public void Check(Human human)
        {
            Console.WriteLine("Welcome to security checking, provide your luggage");
            if (human.Luggage != null)
            {
                while (true)
                {
                    Luggage luggage = human.Luggage;
                    if (luggage.IsForbiddenSubject)
                    {
                        Console.WriteLine("Remove your forbidden subject");

                        luggage.IsForbiddenSubject = false;
                        human.Luggage = luggage;
                    }
                    else
                    {
                        Console.WriteLine("Go to the pasport control");
                        break;
                    }
                }
            }
            human.IsHumanClear = true;
        }