Question: JAVA PROGRAMMING Requirements 1. Collection Class Create a collection of objects. Reuse the class you came up with for Program #3 as the type of

JAVA PROGRAMMING Requirements 1. Collection Class Create a collection of objects. Reuse the class you came up with for Program #3 as the type of object in the collection. You probably will not need to change the class from Program #3 at all Here are some examples of collections to show you what I mean. (You may NOT use any of these objects.) a. Object (from Program #3) Car Tree Money Film Collection (new for Program #4) ParkingLot Forest Wallet or BankAccount Genre b. In the collection class, keep an array of objects. Keep track of the number of items stored in the collection. (See Lab #7 for an example.) c. Implement a constructor for the collection d. Implement a method that will add items to the collection e. Implement a toString) method for the collection. It should return a String containing information for all items in your collection Implement a search) method for the collection. The search method should have a parameter Using the parameter as a key, methodically look through the collection until you find a matching value. Return the matching object from your search() method. Or, if not match is found, return null f. 2. User interface class a. Your solution should have a third class which includes the main) method. The three classes are the single object such as Tree, the collection such as Forest and the user interface class which holds the main() method b. In the main method, declare and instantiate a collection write statements to add at least ten objects to the collection a. b. c. Prompt the user for the value to search for and call the search method). Display the results. If the item is not found, do NOT display null but rather display a more user friendly message Add a sentinel controlled loop to the main() method that prompts the user for the value to search for and performs the search. Continue looping until the user indicates they want to stop d. e. You will do input and output in this class only 3. Design and Documentation Turn in a class diagram for your collection class Turn in a structure diagram for your whole program a. b. 4. Other Requirements
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
