2. Write a java program to create prices of Shopping Cart items that provides a menu: 1: Create a new price for each item in the Cart list 2: Print the price of a particular item 0: Exit Enter your...


I need the asnwer of this ASAP


2. Write a java program to create prices of Shopping Cart items that provides a menu:<br>1: Create a new price for each item in the Cart list<br>2: Print the price of a particular item<br>0: Exit<br>Enter your choice:<br>Define an array: ShoppingCart which stores prices of items. Define another array: ItemsNames of the<br>same size that stores names of such items. Assume that there are 10 items.<br>When the user presses 1, the program call a method that creates a new price for each item in the array<br>using random numbers between 1 and 1000 AED [not inclusive].<br>If the user presses 2, the program call a method that prints the name of the requested item and its price.<br>Use switch case statement for choosing among the menu options. Make a method to display the menu to<br>give the user the possibility to use the menu as much as he/she wants.<br>

Extracted text: 2. Write a java program to create prices of Shopping Cart items that provides a menu: 1: Create a new price for each item in the Cart list 2: Print the price of a particular item 0: Exit Enter your choice: Define an array: ShoppingCart which stores prices of items. Define another array: ItemsNames of the same size that stores names of such items. Assume that there are 10 items. When the user presses 1, the program call a method that creates a new price for each item in the array using random numbers between 1 and 1000 AED [not inclusive]. If the user presses 2, the program call a method that prints the name of the requested item and its price. Use switch case statement for choosing among the menu options. Make a method to display the menu to give the user the possibility to use the menu as much as he/she wants.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here