Example #1
0
        public static void Main()
        {
            List <Person> people1 = new List <Person>()
            {
                new Person("Beckett"),
                new Person("Lee"),
                new Person("Benton")
            };
            List <Person> people2 = new List <Person>()
            {
                new Person("James"),
                new Person("Max")
            };
            List <Person> people3 = new List <Person>()
            {
                new Person("Chase"),
                new Person("Gary")
            };
            Car blueCar = new Car("blue", 5, people1);

            Console.WriteLine(blueCar.PeopleReport());
            blueCar.PutPeopleInCar(people2);
            blueCar.PeopleReport();
            Car    greyCar     = new Car("grey", 2, people3);
            Garage smallGarage = new Garage(2);

            smallGarage.ParkCar(blueCar, 0);
            smallGarage.ParkCar(greyCar, 1);
            Console.WriteLine(smallGarage.Cars);
            Console.WriteLine("");
        }
Example #2
0
        public static void Main()
        {
            List <Person> people1 = new List <Person>()
            {
                new Person("Nancy"),
                new Person("Joan"),
                new Person("Quentin")
            };
            List <Person> people2 = new List <Person>()
            {
                new Person("Pedro"),
                new Person("Olene")
            };
            List <Person> people3 = new List <Person>()
            {
                new Person("Ric"),
                new Person("Gary")
            };
            Car blueCar = new Car("blue", 5, people1);

            Console.WriteLine(blueCar.PeopleReport());
            blueCar.PutPeopleInCar(people2);
            blueCar.PeopleReport();
            Car    greyCar     = new Car("grey", 2, people3);
            Garage smallGarage = new Garage(2);

            smallGarage.ParkCar(blueCar, 0);
            smallGarage.ParkCar(greyCar, 1);
            Console.WriteLine(smallGarage.Cars);
            Console.WriteLine("");
        }