🎯 Objective
Your task is to create a Java class called Car
and a corresponding driver program to interact with it.
...
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.
🚚 Deliverables
Upload the following files in a zip folder that you have created:
Java files - EmployeeCar.java and your driver file
Screenshot of the Console with the code executing
...