Final answer:
To manage a linked list for a rental agency's inventory, define data fields for each car, create a class for car objects, implement the linked list data structure, and populate it with at least 12 cars. Prompt the user for a car location and display the car's details if it exists in the inventory. Submit the code and car information as a text file.
Step-by-step explanation:
To create, compile, and run a program that manages a linked list for the rental agency's inventory, start by defining the necessary data fields for each car, such as the make, model, and VIN. Then, create a class for the car objects and implement the linked list data structure to store the cars. Populate the linked list with at least 12 cars, and print the list to verify the inventory.
To ask for a car by its location in the list, prompt the user to enter a number corresponding to the position of the car in the list. If the car is not in the inventory, display a message stating so. If it is in the inventory, retrieve the car object and print its make, model, and VIN.
Ensure that the program is compiled and run using the necessary files, such as BagInterface.java, Item.java (modified and renamed), and LinkedBag.java. Finally, submit the list of car information as a text file along with your code.