Computers and Technology

The output after adding the two cars would be CAR RENTAL AGENCY MENU
a - Add car to inventory
d - Delete car by id from inventory
u - Update car by id condition in inventory
s - Display one car by id from inventory
i - Display list of all cars in inventory
c - Rent a car by id in inventory
r - Return a car by id to inventory
q - Quit
Choose an option:
i
DISPLAY ALL CARS IN INVENTORY
ID: 1, Ford Mustang. 2018, new, is available
ID: 2, Dodge Charger, 2019, slightly used, is available
CAR RENTAL AGENCY MENU
a - Add car to inventory
d - Delete car by id from inventory
u - Update car by id condition in inventory
s - Display one car by id from inventory
i - Display list of all cars in inventory
c - Rent a car by id in inventory
r - Return a car by id to inventory
q - Quit
Choose an option:
q
Done Car 2 not found in inventory
CAR RENTAL AGENCY MENU
a - Add car to inventory
d - Delete car by id from inventory
u - Update car by id condition in inventory
s - Display one car by id from inventory
i - Display list of all cars in inventory
c - Rent a car by id in inventory
I - Return a car by id to inventory
9 - Quit Choose an option:
9 Done
Part 9 (24 Points)
In main0, implement static boolean rentCar(List cars, Scanner scan) rentCar() should have the user enter anid for the car to be rented. It should then find the car with id in the cars List. After finding the car by id in the List, it should check that the car is not already rented (car. isRented() should be false). If the car is not already rented then toggle the car rent status. The following are possible outcomes for this method: • The car id is found and the car was not already rented. Notify the user of a successful rent and return true. • The car id is found but the car is already rented. Notify the user that the car is rented and return false • The car id is not found. Notify the user that the car id is not in the inventory and return false Call rentCar() from the switch statement in main() when the user selects option c. Note: Place a System. out. println(); before every return in the function to get the proper spacing. Ex Assume the following input. This input creates a car, attempts to rent it, then attempts to rent it again. Then a non-existent car is attempted to be rented. Input 1 Ford Mustang 2018 пен 1 1 2 9 The output after adding the car would be

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:30, KrishnaBalaram1235
To hide gridline when you display or print a worksheet
Answers: 1
image
Computers and Technology, 23.06.2019 00:30, vane3152
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
image
Computers and Technology, 23.06.2019 18:00, teamroper35
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, cheycheybabygirl01
How can the temperature of a room be raised by 5degreesf?
Answers: 1
Do you know the correct answer?
The output after adding the two cars would be CAR RENTAL AGENCY MENU
a - Add car to inventor...

Questions in other subjects: