Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions