Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Supermarket project: Project Description: The project enables the user to enter a group of purposes, so that for each purpose the user enters his group

Supermarket project:
Project Description:
The project enables the user to enter a group of purposes, so that for each purpose the user enters his group code and the number of units from
The same purpose. When finished, the user enters an X instead of the purpose code.
A menu appears to the user containing several options.
Option No.1: Total invoice in shekels (total item prices)
Option 2 Total bill in dollars ($1=3.5 shekels)
Option 3 Total discount in shekels (total discount on all items)
Option 4 Payment (request to enter the amount paid and display the remaining amount as usual)
Option 5 Offer the highest value and lowest price
Option 6 Cancel the process and start over
Option 7 Move to the next customer
Option 8 Exit
Each item belongs to one of the following groups (e, d, c, b, or a) so that the unit price is according to the group and items
The unit price is 2 shekels, b: 4 shekels, c: 6 shekels, d: 8 shekels, e: 10 shekels.
Regarding the discount, the customer gets a discount of 5% if the total bill is more than 100 shekels, and 10% if the total is
The bill is more than 1000
There is a 16% tax on the value of purchases, calculated before the discount.
Notes:
o The form of the list must be according to what was mentioned and what is found in the experiment below.
o The solution method must be adhered to and the presence of five Functions as follows:
o The first function: costFinder is used to display the menu. It displays the list of options
o A second function: printMenu to calculate the price for each item. (Price of the item = number of units * price of the group to which it belongs
Purpose by symbol), the function takes the symbol of the group to which the purpose belongs and the number of units of the same purpose and calculates
Price for this purpose.
o A third function: shikelToDollar to convert the amount in shekels into dollars, so that the same function prints the result on the screen.
o A fourth function: discountCalculator, to calculate the discount value, takes the total amount and returns the discount value to the amount.
o A fifth function: remaining to calculate the remaining amount by taking the amount paid and requested and displaying the remaining amount
Directly on the screen.
o If the wrong product code is entered, the user must be asked to re-enter it
o If the wrong option number is entered from the list, the user must be asked to re-enter it
o You can not enter any products and terminate the program from the beginning
o Comments must be placed on the program parts to clearly explain their function

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_2

Step: 3

blur-text-image_3

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

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

What are the requirements for a valid warrant?

Answered: 1 week ago