You currently manage four stores and have the following data. The first row acro
ID: 3642983 • Letter: Y
Question
You currently manage four stores and have the following data. The first row across list the store numbers, the first column lists the items you carry and the numbers represent the quantity of the item.Store 101 Store 102 Store 103 Store 104
Tennis Shoes 102 54 20 78
Sweaters 45 25 35 75
Jeans 12 35 45 65
Shorts 54 25 34 45
Jackets 15 35 50 25
Create a 2-dimensional array for the data above. Create a demonstration program that does the following:
Allows the manager to enter a store number and displays the quantity of all the items at the store
Allows the manager to enter a store number and item and displays the quantity for that store and item
Allows the manager to enter an item and displays the quantity for each store
Allows the manager to enter a specific quantity and returns all items whose inventory is below the specified quantity (For example, if the manager enters 25 then the program would display the following: Store 103 Tennis Shoes, Store 101 Jeans and Jackets
Explanation / Answer
/*you may also download my code from.......http://www.2shared.com/file/PeKvj08b/Store.html*/ import java.util.Scanner; public class Store { public static void main(String[] args) { int num; int column = -1; int row = -1; int quantity; String name; int[] StoreNo = { 101, 102, 103, 104 }; String[] storeName = { "tennis shoes", "sweaters", "jeans", "shorts", "jackets" }; int[][] data = { { 102, 54, 20, 78 }, { 45, 25, 35, 75 }, { 12, 35, 45, 65 }, { 54, 25, 34, 45 }, { 15, 35, 50, 25 } }; try { Scanner input = new Scanner(System.in); System.out .println("**************Demonstration-1******************"); System.out.println("Enter the store no :"); num = input.nextInt(); for (int i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.