We wrote a program to perform check-out functionality in the class for a simple Farmers Market store with exactly 5 products.
Price per pound
After getting the weight for each product purchase and compute & output the total purchase amount in the end. Do not use loops or arrays in this assignment. You can assume that all the user inputs are valid & the user will enter 0 for products (s)he does not purchase – no need to do any input validation explicitly. Use meaningful variable names & achieve "self-documenting" style of coding.
Let us enhance it further using decision structure to apply discounts. Store has introduced two types of discounts to attract more customers and to make each customer to purchase more.
Discount card program to attract customers. All customers who have signed up for it are considered as "special customers" and they get automatic minimum 10% discount off based on the total purchase amount. However, this cannot be combined with other discounts.
All customers are eligible for the following discount program. If the total purchase is above $50, 5% discount will apply. If the total purchase exceeds $75, 10% discount will apply. If the total purchase exceeds $100, 15% discount will apply.
Apply the maximum possible discount for each customer based on the above rules. After computing the total purchase amount, program should determine the discount & output the following items if a discount is applied:
discount % and discount amount
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.
Leave a comment