static void Main(string[] args) { Zero fxs = new Zero() { MainColor = "blue" }; Tesla modelS = new Tesla() { MainColor = "red" }; Cessna mx410 = new Cessna() { MainColor = "white" }; Ram truck = new Ram() { MainColor = "grey" }; fxs.Turn("left"); fxs.Turn("right"); fxs.Stop(); modelS.Turn("left"); modelS.Turn("right"); modelS.Stop(); mx410.Turn("left"); mx410.Turn("right"); mx410.Stop(); truck.Turn("left"); truck.Turn("right"); truck.Stop(); }
static void Main(string[] args) { Console.WriteLine("The motorcycle"); Zero Motorcycle = new Zero(); Motorcycle.MaximumOccupancy = "2"; Console.WriteLine($"Motorcycle max occupancy: {Motorcycle.MaximumOccupancy}"); Motorcycle.ChargeBattery(); Motorcycle.Drive(); Motorcycle.Stop("motorcycle"); Console.WriteLine("The Tesla"); Tesla Car = new Tesla(); Car.MaximumOccupancy = "5"; Console.WriteLine($"Car max occupancy: {Car.MaximumOccupancy}"); Car.SelfDriving = true; Console.WriteLine($"Car self driving: {Car.SelfDriving}"); Car.ChargeBattery(); Car.Drive(); Console.WriteLine("The Ram"); Ram Truck = new Ram(); Truck.MaximumOccupancy = "2"; Console.WriteLine($"Truck max occupancy: {Truck.MaximumOccupancy}"); Truck.TowCapacity = "1 ton"; Console.WriteLine($"Truck tow capacity: {Truck.TowCapacity}"); Truck.Drive(); Truck.Turn("left"); Console.WriteLine("The Plane"); Cessna Plane = new Cessna(); Plane.MaximumOccupancy = "4"; Console.WriteLine($"Plane max occupancy: {Plane.MaximumOccupancy}"); Plane.Drive(); Plane.Stop("plane"); Console.WriteLine("The CR-V"); Honda Crv = new Honda(); Crv.MaximumOccupancy = "5"; Console.WriteLine($"CRV max occupancy: {Crv.MaximumOccupancy}"); Crv.Drive(); Crv.Turn("right"); }