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, 21.06.2019 22:50, prettybaby406
Explain why it is reasonable to assume that receiving 3 duplicate acks in tcp is an indication that the network is not currently congested.
Answers: 1
image
Computers and Technology, 22.06.2019 11:10, 17795
Look at the far left lane in the picture. explain what the red car is doing and what it needs to do to travel safely.
Answers: 2
image
Computers and Technology, 23.06.2019 14:00, ava5015
What is html ? give a small description about html
Answers: 2
image
Computers and Technology, 24.06.2019 02:00, akatherine1738
What is a loop? a. a collection of function definitions at the top of a program b. a line of code that defines a variable and assigns it a value c. a program that opens the turtle graphics window d. a block of code that repeats a specific number of times
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:

Konu
Mathematics, 25.09.2019 02:30
Konu
Mathematics, 25.09.2019 02:30