- Practical Quiz 1 Write A Java Program To Help A Grocery Store To Generate A Report About The Products In The Store You 1 (54.51 KiB) Viewed 41 times
Practical Quiz 1 Write a java program to help a grocery store to generate a report about the products in the store. You
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Practical Quiz 1 Write a java program to help a grocery store to generate a report about the products in the store. You
Practical Quiz 1 Write a java program to help a grocery store to generate a report about the products in the store. You need to define two arrays of size 5: a. Products array to store the name of products (String). b. Quantity array to store the quantity on hand for each product (integer). program should prompt the user to enter data of each product. Then if should generate a report that shows the number of products that are out of stock and list them (products with quantity equals to zero) Sample Input/Output: Enter product name and quantity: Cheese 20 Enter product name and quantity: Eggs 15 Enter product name and quantity: Bread 0 Enter product name and quantity: Pasta 33 Enter product name and quantity: Yogurt 0 Number of products that are out of stock: 2 List of products that are out of stock: Bread Yogurt