static void Main(string[] args) { int maxSpeed; //introduction Console.WriteLine("This is a simple program that uses classes"); Console.WriteLine("It will collect info about your car"); Console.WriteLine("and then show that it can do basic math by"); Console.WriteLine("calculating the speed of the vehicle"); //instanceate the class Car usersCar = new Car(); Console.WriteLine("Please enter the make of your car: "); usersCar.Make = Console.ReadLine(); Console.WriteLine ("Please enter the year of your " + usersCar.Make); usersCar.Year = Console.ReadLine(); Console.WriteLine ("Please enter the max speed of your " + usersCar.Year + " " + usersCar.Make); bool converted = false; while (converted == false) { if (int.TryParse(Console.ReadLine(), out maxSpeed)) { usersCar.MaxSpeed = maxSpeed; converted = true; } Console.WriteLine("Please enter an integer : "); } //accelerate the vehicle Console.WriteLine ("The " + usersCar.Year + " " + usersCar.Make + " will now accelerate:"); int n = 0; while (n != 5) { usersCar.accelerate(); Console.WriteLine(usersCar.Speed + "MPH"); n += 1; } Console.WriteLine ("The " + usersCar.Year + " " + usersCar.Make + " will now brake:"); n = 0; while (n != 5) { usersCar.brake(); Console.WriteLine(usersCar.Speed + "MPH"); n += 1; } Console.WriteLine("Press any key to exit the program"); Console.ReadLine(); }