subject

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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:30
By refraining from constructing a building until they are certain that it will not cause harm to the environment, an organization is adhering to the
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen too
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Create a file called favorite_foods, and list your favorite foods, entering five or six or more. press enter after each favorite food so it appears on its own line (make certain you also press enter after the final food item). after the file is created, add two more foods you like that are not on the list (press enter after the final food item). view the list of foods to make certain the two items you added appear at the end of the list
Answers: 2
You know the right answer?
The output after adding the two cars would be CAR RENTAL AGENCY MENU
a - Add car to inventor...
Questions
question
Mathematics, 12.10.2020 06:01
question
Mathematics, 12.10.2020 06:01
question
Mathematics, 12.10.2020 06:01
question
Computers and Technology, 12.10.2020 06:01
Questions on the website: 13722367