Question: the class I already have, need subclass NOTE: To implement encapsulation, all of the instance variables/fields should be private. The class should include the following:

 the class I already have, need subclass NOTE: To implement encapsulation,
all of the instance variables/fields should be private. The class should include
the following: class variables as follows o Total_ Rentals, to hold the
number of vehicle rentals so far. Assume that the number of times
vehicles have been rented so far is 1050 times and this wilthe class I already have, need subclass
increase when each new VehicleRental (or subclass, TruckRental, as in the next
question) object is created. o BASIC which is an initial basic rental
charge of $25.00 applied to all rentals .a constructor/initializer method to initialize

NOTE: To implement encapsulation, all of the instance variables/fields should be private. The class should include the following: class variables as follows o Total_ Rentals, to hold the number of vehicle rentals so far. Assume that the number of times vehicles have been rented so far is 1050 times and this wil increase when each new VehicleRental (or subclass, TruckRental, as in the next question) object is created. o BASIC which is an initial basic rental charge of $25.00 applied to all rentals .a constructor/initializer method to initialize all instance variables; default values for the accessor methods for accessing the instance variables vlicense (the vehicle's license a getRentalCharge method that computes and returns the total rental charge for the oDAILY which is the daily rental charge of $30.00 per day licenses should be "n/a" and for the number of rental days should be zero number) and numDays (the number of days for which the vehicle has been rented)

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 Databases Questions!