...
Prompts the user to enter the brand, model, year, and current mileage for a new car.
Creates a new
Car
object using the parameterized constructor and the user's input.Prints out the car's brand, model, year, and current mileage .(format output and make sure you label the data)
Prompts the user to enter a the number of miles to drive the car. Calls the
drive
method with the user's input, then prints out the car's new mileage using an appropriate label.
This assignment will allow you to practice using classes, constructors, methods, and simple user interactions in Java. The Car
class is a simple model of a real-world entity.
...