Answered step by step
Verified Expert Solution
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: Total invoice in shekels total item prices
Option Total bill in dollars $ shekels
Option Total discount in shekels total discount on all items
Option Payment request to enter the amount paid and display the remaining amount as usual
Option Offer the highest value and lowest price
Option Cancel the process and start over
Option Move to the next customer
Option 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 shekels, b: shekels, c: shekels, d: shekels, e: shekels.
Regarding the discount, the customer gets a discount of if the total bill is more than shekels, and if the total is
The bill is more than
There is a 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 reenter it
o If the wrong option number is entered from the list, the user must be asked to reenter 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started