Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write comments on source , and read all the question .. I don't need any repetead answer , thank you ... Write Java Program

Please write comments on source , and read all the question ..

I don't need any repetead answer , thank you ...

Write Java Program to simulate online Store System. Any customer enter the store will assign a new shopping cart. The shopping cart is a collection of items that a customer uses to collect (items)things for purchase. A customer can add items to the cart, remove them, empty the cart, view the items in the cart, and end shopping and proceed to checkout. The program must have a menu showing its services as shown below: Store System Menu 1. Add a new item to Store 2. Add a new Customer to Store 3. Add an item to Customer shopping cart 4. View the items in Customer shopping cart 5. Empty Customer shopping cart 6. Exit the program The above services must do the following actions 1. Add a new Item to Store. The system prompts to the user for adding a new item data. The item data contains the following items: - o item number: holds an unique number for the item. - item name: holds the full name of the item. o-item quantity: holds the quantity of the item. o-item price: holds the price of the item Add Item Operation : Please enter the item number: 001 Please enter the item Name: Fifa 20 game Please enter the quantity : 200 Please enter the price: 20.56 Enter the type of item (B)Book, (s)shoes, (G)Game ?: G Item added Successfully Do you want add another item (w/n)? Add Item Operation : Please enter the item number: 002 Please enter the item Name: Calculus Book Please enter the quantity: 100 Please enter the price : 95.2 Enter the type of item (B)Book, (s)shoes, (G)Game ?: B Enter the Book title : introduction of Calculus Math Enter the Book author name : ahmed Item added Successfully Do you want add another item (v/n)?n 2. Add a new Customer. The system prompts to the system user for adding data for a new customer data. The customer data contains the following items: o customer No: holds an unique number of a customer. - customer name: holds a name of the course. - - New Shopping cart will be create and added automatically for the new customer. The shopping cart will be empty Add new Customer Operation : Please enter the customer number: 0011 Please enter the customer Name : Jamal Abo Mohammed Customer added with empty shopping cart Successfully Do you want add another item (/n)? The System will repeat adding another customer, if the user answer yes for the question "Do you want add another customer (v/n)?". if the user select no, the system will return to the main menu showing it's services. 3. Add an item to Customer shopping cart The system asks the user about a wanted customer for adding an item to his shopping cart. The system will allow the user to specify the customer by a customer number. The system will search about the specified customer to show if he/she is exists or not exits. If the customer is exist, The system will display a form displaying all items in the store. Then the system will ask the user to enter the items number and the required item quantity that the customer wants to add to his shopping cart. For each input the system will check the required item quantity with the item quantity in the store to validate that the required quantity is available in the store for that item, if not that the system will alert the user and will not allow the user to add the item to shopping cart. Sample input for this case: Add Item to Customer Shopping Cart Operation : Please Enter customer number: 212 The customer is not exits, Do you want try againly/n)? y Please Enter customer number: 215 The customer no:215,The customer name : Ali Al-Masri. Items in the store >>> 1. 1401 Java Book. [3] >>> 2. 1311 logo Game. [5] >>> 3. 1444 Nike sport shoes [1] >>> 0. Return to a main menu Enter your choice item :3 The item is (1444 Nike sport shoes [1]] Enter the quantity you need : 2 Sorry the required quantity is not available, the available quantity is [1], try again! Do you want add another item to shopping cart (W/n)? y Enter your choice item :3 The item is (1444 Nike sport shoes [1]] Enter the quantity you need : 1 The item is [1444 Nike sport shoes [1] ] adding to shopping cart is success Do you want add another item to shopping cart (y/n)? y Enter your item choice 1 The item is (1401 Java Book. [3] ] Enter the required quantity: 1 The item is [1401 Java Book. [1] ) adding to shopping cart is success Do you want add another item to shopping cart (v/n)?n 4. View the items in Customer shopping cart The System should display the items in shopping cart for a given customer. View the items in Customer shopping cart Operation : Enter customer number: 215 Item no Item name Quantity Unit price Total price 1401 Java Book 1 20 20 Total price 20 Press (m/M) key to return to the main menu: m 5. Empty Customer shopping cart The System should remove all items in shopping cart for a given customer or assign new shopping cart for the customer. Notes: Your solution must contain multiple class for example Customer class, Store class, Shopping Cart

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Repeat Problem 31.68 for the case w = 2w0.

Answered: 1 week ago

Question

Explain how cultural differences affect business communication.

Answered: 1 week ago

Question

List and explain the goals of business communication.

Answered: 1 week ago