(Program based on a 'Selection' and 'Loop' structures, Counters and Accumulators)
You have been tasked with updating a program for a automotive junk yard. They still want want to encourage their customers to make large purchases ($1000 or more) so the customer can get 15% off their order. Additionally, sales tax is 8% and they are no longer offering the 1% sales tax to customers over 70 years old. However, they still want to display a receipt showing the amount of purchase, the amount of the discount (if any), sales tax, and the total costs. At the end of the day, they want a summary displaying the total number of customers and the total amount of sales (includes the sales tax).
Requirements:
Flowchart must list ALL variables (constant and regular) first
Begin by asking the customer if they want to make a purchase (yes or no)?
Next, ask the customer for their purchase amount (if the previous response was a "yes")
At the end of the transaction, they want to provide the customer a receipt with the following information:
Initial amount of the order
Total amount of discount (if any)
The subtotal (initial order minus the discount)
The amount of sales tax
Total
Determine if there is another customer (yes or no)
Receipt Example:
(Based on 3 customers - for testing purposes only) Order = $2000 Discount = $300 Sub Total = $1700 Sales Tax = $136 Total = $1836
Order = $200 Discount = $0 Sub Total = $200 Sales Tax = $16 Total = $216
Order = $1000 Discount = $150 Sub Total = $850 Sales Tax = $68 Total = $918
When there are no more customers, display the following information:
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.