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
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
question
Computers and Technology, 22.06.2019 10:00
What is a society that has moved to the internet rather than relying on physical media called
Answers: 2
question
Computers and Technology, 22.06.2019 15:10
Which activity should be part of a long-term plan to positively affect yourhealth? oa. wearing regular clothing when handling toxinsob. not worrying about secondhand smokeoc. avoiding excessive exposure to sunlightod. drinking only well water
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Consider the following function main: int main() { int alpha[20]; int beta[20]; int matrix[10][4]; . . } a. write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. b. write the definition of the function doublearray that initializes the elements of beta to two times the corresponding elements in alpha. make sure that you prevent the function from modifying the elements of alpha. c. write the definition of the function copyalphabeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. make sure that you prevent the function from modifying the elements of alpha and beta. d. write the definition of the function printarray that prints any onedimensional array of type int. print 15 elements per line. e. write a c11 program that tests the function main and the functions discussed in parts a through d. (add additional functions, such as printing a two-dimensional array, as needed.)
Answers: 3
You know the right answer?
The output after adding the two cars would be CAR RENTAL AGENCY MENU
a - Add car to inventor...
Questions
Questions on the website: 13722367