static void Main() { BMW X5 = new BMW("Vasia", "Petrol", 60, 9, 94, 230, 14, true, false, true, true, true); BMW X6 = new BMW("Petia", "Petrol", 80, 9, 94, 250, 10, true, false, true, true, true); Console.WriteLine($"My subjective assessment of the car is {X6.CarRate()}"); Console.WriteLine($"You have an {X6.MotorAgeCheck()}"); X5.ShowAllInfo(); int compareIndex = X6.CompareTo(X5); if (compareIndex == 0) { Console.WriteLine("the maximum speed is the same \n" + $"compareIndex = {compareIndex}"); } else if (compareIndex == 1) { Console.WriteLine("bmw X6 is faster \n" + $"compareIndex = { compareIndex}"); } else { Console.WriteLine("bmw X5 is faster \n" + $"compareIndex = { compareIndex}"); } X6.ChangeOwner("Kolia"); Console.WriteLine(X6.GetOwner()); X6.PassInspection("today"); Console.WriteLine(X6.GetInspectionDate()); }
public override void ShowAllInfo() { BMW.SeeAllInNewColor("red"); Console.WriteLine($"your vehicle type is {vehicleType} \n" + $"{Assist.outputAssistant1} type is {fyelType} \n" + $"{Assist.outputAssistant1} quantity is {fyelQuantity} liters \n"); BMW.SeeAllInNewColor("green"); Console.WriteLine($"{Assist.outputAssistant1} consumption is {fyelConsumption} liters/100km \n" + $"{Assist.outputAssistant1} tank volume is {fuelTankVolume} liters \n" + $"your max. speed is {maxSpeed} km/h \n"); BMW.SeeAllInNewColor("yellow"); Console.WriteLine($"{Assist.outputAssistant2}n automatic transmissionType? it's {automaticTransmissionType} \n"); SeeAllInNewColor += RandomColor; SeeAllInNewColor("white"); Console.WriteLine($"{Assist.outputAssistant2} Conditioner? it's {presenceOfConditioner} \n" + $"{Assist.outputAssistant2}n Autopilot? it's {presenceOfAutopilot} \n" + $"{Assist.outputAssistant2} sport car mode)? it's {presenceOfSportCarMode} \n" + $"{Assist.outputAssistant2} remote control? it's {presenceOfRemoteControl} \n"); }