Question
Write a java program called CarRental that computes the cost of renting a car for a day based on the size of the car: economy
Write a java program called CarRental that computes the cost of renting a car for a day based on the size of the car: economy 20$ a day, medium 35$ a day, or full-size 50$ a day. Include a constructor that requires the car size. Add a subclass (inheritance) called CarGPS to add the option of a car GPS. If a user chooses to have GPS then he/she will be charged extra 10$.Write a program called UseCarRentalAndGPS to use these classes. This assignment requires basic user input. Inputting if the car is economy, medium, or full-size. Also there must be userinput for if they want gps. Please do this assignment with as much simplicity as possible so i may understand what exactly you are doing.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started