static void Main(string[] args) { //TODO Be sure to follow BEST PRACTICES when creating classes and interfaces //Create 2 Interfaces called IVehicle & ICompany //Create 3 classes called Car , Truck , & SUV //In your IVehicle /* Create 4 members that Car, Truck, & SUV all have in common. * Example: All vehicles have a number of wheels... for now.. */ //In ICompany /*Create 2 members that are specific to each every company * regardless of vehicle type. * * * Example: public string Logo { get; set; } */ //In each of your car, truck, and suv classes /*Create 2 members that are specific to each class * Example: truck has a bed size while car has a trunk while suv has a cargo hold size * * Then, Set each class to inherit from both IVehicle and ICompany and implement their members. * */ //Now, create objects of your 3 classes and give their members values; //Creatively display and organize their values var toyota = new Car() { Wheels = 4, Color = "blue", Doors = 4, Name = "Toyota", Value = 30 }; var GMC = new Truck(); GMC.BedSize = 100; GMC.Wheels = 16; GMC.Color = "Orange"; GMC.Doors = 2; GMC.Name = "GMC"; GMC.Value = 1000; Console.WriteLine(GMC.Drive()); }
static void Main(string[] args) { //TODO Be sure to follow BEST PRACTICES when creating classes and interfaces //Create 2 Interfaces called IVehicle & ICompany //Create 3 classes called Car , Truck , & SUV //In your IVehicle /* Create 4 members that Car, Truck, & SUV all have in common. * Example: All vehicles have a number of wheels... for now.. */ //In ICompany /*Create 2 members that are specific to each every company * regardless of vehicle type. * * * Example: public string Logo { get; set; } */ //In each of your car, truck, and suv classes /*Create 2 members that are specific to each class * Example: truck has a bed size while car has a trunk while suv has a cargo hold size * * Then, Set each class to inherit from both IVehicle and ICompany and implement their members. * */ //Now, create objects of your 3 classes and give their members values; //Creatively display and organize their values Car myCar = new Car(); myCar.logo = "Ford"; myCar.name = "Mustang"; Truck myTruck = new Truck(); myTruck.logo = "Ford"; myTruck.name = "Raptor"; SUV mySUV = new SUV(); mySUV.logo = "Hummer"; mySUV.name = "Humvee"; Console.WriteLine(myCar.Drive()); Console.WriteLine(myTruck.Drive()); Console.WriteLine(mySUV.Drive()); }