Create mutator and accessor functions for the instance


Please help me with the java problem

Please create mutator and accessor functions for the instance variable cars. Note: we want to maintain the security of the private member variable cars.

In other word, you may need to use deep copy concept to handle the accessor.

public class RentalCarCompany

{

/** Instance variable */

private Car[] cars;

// constructor

public RentalCarCompany() {

cars = new Car[10];

}

}

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Create mutator and accessor functions for the instance
Reference No:- TGS02889470

Expected delivery within 24 Hours