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 functionenter your choice
1
totCostAfterDis is 152.000000 shikel
1- Receipt in shikel
2- Receipt in dollar
3- Total discount in shilkel
4- pay
5- find max and min
6- Cancel current
7- Next custemer
8- Exit
enter your choice
2
428571 dollars
1- Receipt in shikel
2- Receipt in dollar
3- Total discount in shilkel
4- pay
5- find max and min
6- Cancel current
7- Next custemer
8- Exit
enter your choice
3
tot Discount is 8.000000 shikel
1- Receipt in shikel
2- Receipt in dollar
3- Total discount in shilkel
4- pay
5- find max and min
6- Cancel current
7- Next custemer
8- Exit
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions