Develop a simple RentalCarCompany program for a Rental Car Company, call it whatever you like. We will have two classes, a Car class and aRentalCarCompany class. The RentalCarCompany class will contain several Car objects stored in an array and will have several operations. We will also have a tester class to test the RentalCarCompany class.
Specific Requirements for theCar class:
Default constructor that sets all instance variables to default values.
A parameterizes constructor that takes in parameters to set the class’s instance variables : String (the name of the car renter), int (the car number: a number used to identify each rental car the company owns), String (the car name or model), String (the car type, for example, compact or mid size), double (the car’s rental rate), and an int (the number of days rented).
Accessor and mutator methods for all the instance variables (see UML Class diagram above)
View original post 525 mots de plus