Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

In the program description, the items sold are referred to as item1 and item2. Choose your own two items and name the variables accordingly. What two...

Create two more Store objects and initialize their inventory. Do this before you start the loop to purchase something at Store1. This will test if you are correctly keeping track of inventory across multiple locations. When they choose to exit the loop to buy items, print the amount of inventory at each store and the total overall for each item. The output should look something like:

Item 1Store 1: 5Store 2: 10Store 3: 15Total: 30

Item 2Store 1: 8Store 2: 7Store 3: 20Total: 35

NOTES: When you call nextInt(), it leaves a carriage return in the buffer. If you have a nextLine() call that follows it, it will read the carriage return as its input. To remedy this, before calling a nextLine() (but after you have called a nextInt()), clear the buffer with an extra call to nextLine().

**Program needs to be done in Java and for a more beginner type of programmer

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question