Question: Can someone help me with the following code please Write a class called Dealer that has two fields of type Vehicle and Customer. The field
Write a class called Dealer that has two fields of type Vehicle and Customer. The field for Vehicle is a class that has fields: make, model, and VIN. The field Customer is a class that has fields: Name and account number. The field called Name is also an existing class with fields last_name and first_name; and the field account number is a unique identifier of each customer. Also, the class Customer has an accessor method called getName(). that returns the reference to a Name object; and the class Name has an accessor method that returns a string representing the last name of an individual. From the above narrative do the following. Define the class Dealer so that you can create a Dealer object either by a customer object, or by a customer object and a vehicle object. Provide accessor methods for each type of fields in the class Dealer Also, provide a mutator method that changes a vehicle that replaces a current vehicle for another one Suppose the variable d is a reference to a Dealer object, write appropriate Java statement(s) that will extract the last name of an individual customer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
