Question: public class Mall { private final int NUM_STORES = 2; private String name; Store[] storeList; public Mall() { storeList = new Store[NUM_STORES]; } //TODO 01:

public class Mall {

private final int NUM_STORES = 2;

private String name;

Store[] storeList;

public Mall()

{

storeList = new Store[NUM_STORES];

}

//TODO 01: create a setter for name

//TODO 02: create a setter for a store in location i

//TODO 03: create a getter for a store in location i

//TODO 15: override toString to represent the mall as follows:

/*

* Mall Name:

* Store 1:

* Name:

* Type: (Grocery or Restaurant)

* Rating or itemList

* Store 2:

* Name:

* Type: (Grocery or Restaurant)

* Rating or itemList

*/

}

____________________________________________________________________

public class GroceryStore {

private String[] items;

private final int MAX_ITEMS = 3;

//TODO 05: create a constructor that initializes all instance variables.

//TODO 06: create a setter for an item in location i

//TODO 07: create a getter for the item in location i

}

__________________________________________________________________

public class RestaurantStore {

private int rating;

//TODO 08: create a constructor that initializes all variables

}

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!