
(a) Write a class named CarRental that contains fields that hold a renterâ??s name, zip code, size of the car rented, daily rentral fee, length of rental in days, and total rental fee.
The class contains a constructor that requires all the rental data except the daily rate and total fee, which are calculated, based on the size of the car: economy at RM29.90 per day, midsize at RM38.90 per day, or full size at RM43.50 per day. The class also includes a display () method that displays all the rental data.
(b) Create a subclass named LuxuryCarsRental. This class sets the rental fee at RM79.90 per day and prompts the user to respond to the option of including a chauffeur at RM200 more per fay. Override the parent class display() method to include chauffeur fee information.
(c) Draw a complete UML Diagram for above two classes and their relationship.
(c) Write an application named UseCarRental that prompts the user for the data needed for a rental and creates an object of the correct type. Display the total rental fee.

(a) Write a class named CarRental that contains fields that hold a renter�s name, zip code, size of the car rented, daily rentral fee, length of rental in days, and total rental fee.
The class contains a constructor that requires all the rental data except the daily rate and total fee, which are calculated, based on the size of the car: economy at RM29.90 per day, midsize at RM38.90 per day, or full size at RM43.50 per day. The class also includes a display () method that displays all the rental data.
(b) Create a subclass named LuxuryCarsRental. This class sets the rental fee at RM79.90 per day and prompts the user to respond to the option of including a chauffeur at RM200 more per fay. Override the parent class display() method to include chauffeur fee information.
(c) Draw a complete UML Diagram for above two classes and their relationship.
(c) Write an application named UseCarRental that prompts the user for the data needed for a rental and creates an object of the correct type. Display the total rental fee.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.