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:
* Rating or itemList
* Store 2:
* Name:
* Type:
* 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started