Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Prompts the user to enter the brand, model, year, and current mileage for a new car.

  2. Creates a new Car object using the parameterized constructor and the user's input.

  3. Prints out the car's brand, model, year, and current mileage .(format output and make sure you label the data)

  4. Prompts the user to enter a the number of miles to drive the car. Calls thedrive 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.

...