Question: Develop and test the following classes: Vehicle abstract class (and subclasses Car, SUV, Truck), and the Vehicles aggregation class. VehicleRates abstract class (and subclasses CarRate,

Develop and test the following classes: Vehicle abstract class (and subclasses Car, SUV, Truck), and the Vehicles aggregation class. VehicleRates abstract class (and subclasses CarRate, SUVRate, and TruckRates), and the Rates class. Account class and the Accounts aggregation class. Transaction class and the Transactions aggregation class. The Cost and Reservation classes.

Develop and test the following classes: Vehicle abstract class (and subclasses Car,

SUV, Truck), and the Vehicles aggregation class. VehicleRates abstract class (and subclasses

CarRate, SUVRate, and TruckRates), and the Rates class. Account class and the

Accounts aggregation class. Transaction class and the Transactions aggregation class. The Cost

and Reservation classes. Abstract Classes Needed Abstract Vehicle Class instance variables private

String description II make-model for cars/suvs, length for trucks private int mpg

Abstract Classes Needed Abstract Vehicle Class instance variables private String description II make-model for cars/suvs, length for trucks private int mpg private String VIN private Reservation resv II If null, then vehicle not reserved private Cost I/ miles per gallon I/ unique vehicle identification number only assigned when vehicle reserved appropriate constructor and getter/setter methods public abstract String toString(); ABSTRACT METHOD-implemented in each subclass Il returns a labeled string of information about a particular vehicle e.g. Honda Odyssey (SUV) MPG: 28 Seating: 7 Storage: 6 cu. ft. VIN: QK3FL4273ME public boolean isReserved...) public void reserve(Reservation) - throws ReservedVehicleException (if vehicle already reserved) public cancelReservation) .) - throws UnreservedVehicleException if reservation doesn't exist

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!