Question: AutoPark Class: must have an instance variable called name (a string) to store the name of the AutoPark. It should have a one-argument constructor that

AutoPark Class: must have an instance variable called name (a string) to store the name of the AutoPark. It should have a one-argument constructor that accepts a string to specify the name of the AutoPark. This class must also contain instance variables to store two objects of each of the previous five classes (10 items in total). The constructor for this class must create these instances of each class (using the constructors defined in those classes) to initialize these attributes. For storage purposes, you can use separate variables or arrays to store these items (e.g., one variable for each item or an array for each type of items, such as sedans, SUVs, tires etc.). For this assignment, you can hard-code the argument values for each of the item constructors (i.e., color, price etc.) or use a random number generator to randomly assign a reasonable value. This class should also have a void method called displayltems() that will print each item in park's inventory to the console in a readable format. Additiona

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!