Question: Show me the steps to solve this using Java please? 1 . Class - Vehicle o Create a class named Vehicle. o Define private string

Show me the steps to solve this using Java please?
1. Class - Vehicle
o Create a class named Vehicle.
o Define private string variables for the vehicles color, make, and model.
o Define a private integer variable for the number of doors.
o Define private double variables for the discount and price.
Constructors:
o Implement a copy constructor that takes a Vehicle object as a parameter and initializes the fields accordingly.
o Implement a constructor that accepts all private fields and assigns them using the this keyword.
o Create a no-argument constructor that initializes all fields to default values.
Methods:
o Implement necessary accessor and mutator methods.
o Implement a method to calculate the total price after applying the discount.
o Override the toString method to provide a user-friendly representation of the vehicle.
2. Class - Customer
o Create a class named Customer.
o Define private string variables for name, city, and state.
Methods:
o Implement necessary accessor and mutator methods.
o Override the toString method for user-friendly output.
3. Class - CarDealership
o Create an aggregate class that utilizes the Vehicle and Customer classes.
o Create Main class.
o Define private string fields for the store name and location.
o Implement private ArrayList to hold the vehicle inventory.
o Implement private ArrayList to manage customer contacts.
o Override the toString method to present dealership information clearly.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!