Example #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Car Details Below:");
            Car myCar = new Car();

            myCar.Model         = "F150";
            myCar.Year          = 2015;
            myCar.Make          = "Ford";
            myCar.NumberOfDoors = 2;
            Console.WriteLine(myCar.GetCarDetails());
            Console.ReadLine();

            Console.WriteLine("Drivers License Information Below:");
            driversLicense myDL = new driversLicense();

            myDL.FirstName     = "Ben";
            myDL.LastName      = "Laycock";
            myDL.Gender        = "Male";
            myDL.LicenseNumber = "10BB55G";
            Console.WriteLine(myDL.GetFullDl());
            Console.ReadLine();

            Console.WriteLine("Book Information Below:");
            book myBook = new book();

            myBook.Title     = "How to Kill a Mockingbird";
            myBook.Authors   = "Harper Lee";
            myBook.Pages     = 235;
            myBook.SKU       = 22566;
            myBook.Publisher = "Penguin Books";
            myBook.Price     = 19.99;
            Console.WriteLine(myBook.GetBookDetails());
            Console.ReadLine();

            Console.WriteLine("Airplane Information Below:");
            airplane myAirplane = new airplane();

            myAirplane.Manufacturer = "Boeing";
            myAirplane.Model        = 737;
            myAirplane.Variant      = "Convair";
            myAirplane.Capacity     = 400;
            myAirplane.Engines      = 2;
            Console.WriteLine(myAirplane.GetPlaneDetails());
            Console.ReadLine();
        }
Example #2
0
        static void Main(string[] args)
        {
            DriversLicense person = new DriversLicense("Cecil", "Martinez III", "Male", 31415926);

            Console.WriteLine("Driver license name: {0} {1}", person.firstname, person.lastname);
            Console.WriteLine("Gender: {0}", person.gender);
            Console.WriteLine("Driver License #: {0}", person.licensenumber);

            book b = new book("Return of the King", "J.R.R Toklein", 416, 7894545, "George Allen & Unwin", 25.99);

            Console.WriteLine("{0} is written by {1} and has {2} pages, SKN is {3}, publish by {4} and is price at {5}", b.title,
                              b.author, b.pages, b.SKU, b.publisher, b.price);

            airplane a = new airplane("McDonnell Douglas", "F-15", "F-15B", 1, 2);

            Console.WriteLine("Manufacturer of a {0} is {1}, it has {2} engines with {3} person capacity and a variant is {4}."
                              , a.model, a.manufacturer, a.engines, a.capacity, a.variant);
        }