public static void Main() { DriversLicense myDriversLicense = new DriversLicense(); Book myBook = new Book(); Airplane myPlane = new Airplane(); Console.Read(); }
static void Main(string[] args) { DriversLicense dl = new DriversLicense("Tim", "Smith", "Male", 1234); string fullName = dl.GetFullName(); Console.WriteLine(fullName); Console.ReadLine(); }
static void Main(string[] args) { DriversLicense dl = new DriversLicense("Paul", "Norman"); dl.sex = 'm'; dl.DLNumber = 140466; Console.WriteLine(dl.FullName); Console.Read(); }
public static void PoCos() { DriversLicense BlankDL = new DriversLicense(); DriversLicense DL1 = new DriversLicense("Sara", "Ashley", "Female", "12345678"); Console.WriteLine(DL1.GetFullName()); Book book1 = new Book(); Console.WriteLine(book1.Publisher); Airplane plane1 = new Airplane(); }
static void Main(string[] args) { // example //Car mycar = new Car(); //mycar.Model = "Ford"; //mycar.Year = 2015; //mycar.Make = "Ford"; //mycar.NumberOfDoors = 4; //Console.WriteLine(mycar.getcardetails()); //Car yourcar = new Car(); DriversLicense myLicense = new DriversLicense("John", "Cherry", "Male", 12345); Console.WriteLine(myLicense.GetDriversLicenseDetails()); Console.Read(); }
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); }
public static void Main(string[] args) { Console.BackgroundColor = ConsoleColor.White; Console.Clear(); DriversLicense nicksDL = new DriversLicense("Nick", "Riley", "Male", 34554345); Console.ForegroundColor = ConsoleColor.Black; Console.WriteLine(nicksDL.GetDriversLicenseInfoTrafficStop()); Console.ReadKey(); Console.Clear(); Airplane boeing747 = new Airplane("Boeing", "747", "Passenger", 416, 4); Airplane airbusA380 = new Airplane("Airbus", "A380", "Passenger", 853, 4); Console.ForegroundColor = ConsoleColor.Blue; Console.WriteLine($"The airplane i've heard most about is the {boeing747.GetAirPlaneInfo()}" + $"\nuntil I googled it's rival for this class which is the {airbusA380.GetAirPlaneInfo()}\nNow thats a big airplane!"); Console.ReadKey(); Console.Clear(); Book redFern = new Book("Where the Red Fern Grows", new string[] { "Wilson", "Rawls" }, 245, 0440412676, "Doubleday", 8.38, 5, "My favorite book", "Billy has long dreamt of owning not one, but two, dogs. So when he’s finally able to save up enough money for two pups to call his own—Old " + "Dan and Little Ann—he’s ecstatic.\nIt doesn’t matter that times are tough, together they’ll roam the hills of the Ozarks.\nSoon Billy and his " + "hounds become the finest hunting team in the valley.\nStories of their great achievements spread throughout the region, and the combination of " + "Old Dan’s brawn, Little Ann’s brains, and Billy’s sheer will seems unbeatable.\nBut tragedy awaits these determined hunters (now friends) and " + "Billy learns that hope can grow out of despair, and that the seeds of the future can come from the scars of the past."); Book theGiver = new Book("The Giver", new string[] { "Lois", "Lowry" }, 192, 0544336267, "Houghton Mifflin Harcourt", 6.99); theGiver.Summary = "The main message of the novel is that choice is not destructive.\nIn this society, the absence of choice is actually more destructive.\n" + "All choices are made for people, and as a result they act in inhumane and immoral ways and don't even know it."; Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine(redFern.GetBookWithReview()); Console.ReadKey(); Console.Clear(); Console.ForegroundColor = ConsoleColor.Magenta; Console.WriteLine(theGiver.GetBookWoutReview()); Console.ReadKey(); Console.Clear(); }