Answered step by step
Verified Expert Solution
Question
1 Approved Answer
To help increase customer traffic, many restaurants implement reward ( loyalty ) programs for their customers. Such programs vary from restaurant to restaurant. However, most
To help increase customer traffic, many restaurants implement reward loyalty programs for their customers. Such programs vary from restaurant to restaurant. However, most programs involve two components: earning points based on the number, type, or dollar amount of their purchases; and redeeming points they have earned for rewards such as discounts on dining. The challenge for the restaurant is tracking the points earned for each customer and then summarizing rewards they qualify for.
Project Overview
Spartys Breakfast Cafe has been doing a great business since opening a few months ago. However, to keep its momentum going, Sparty would like to implement a loyalty program for its frequent customers. Customers will earn Sparty Points based on both dollars spent at the restaurant as well as number of visits to the restaurant. Although a typical rewards program would include ongoing recording and tracking of reward activities each time a customer makes a visit, we will be developing a program that will simply allow the customer to enter in one or more receipts, figure out their reward points, and report the different rewards they qualify for.
Clarifying note: Although usage should be relatively clear, be aware that the term program can refer to one of two things in this document: the rewards program scheme the restaurant is implementing, and the program you will create to help support the rewards scheme.
Project Objectives
The objectives for this project are to use the initial programming skills and techniques you have learned so far or will learn before the project due date including:
Inputoutput
Variables
Arithmetic expressions and operations
Conditional statements
Relational Boolean expressions
Basic Repetition Looping
Project Description
Earning Points
Customers can earn Sparty Points based on the following criteria for each visit:
visit reward: point for each visit
spend reward: point for every $ spent in a visit no partial points are awarded, eg $ and $ both earn points
high spend bonus: points for every $ spent in a visit again with no partial points awarded
high spend multiplier: if a customer spends $ or more in a visit, then their earned points per above criteria are multiplied by
Example calculations:
Total Bill Visit Points Spend Points High Spend Points High Spend Multiplier Points Earned
$
$
$
$
$
$
$
$
$
$
Redeeming Points
Customers can redeem points based on the following rewards table:
Points Required Reward
discount
Free pancakes
Free combo breakfast
discount
Program Requirements
Your program will need to allow a customer to enter their restaurant receipt information for any number of individual visits. Based on the information they enter ie total cost from each their restaurant receipts you will then tabulate the rewards program points and print a summary of possible awards the customer has earned.
Side comment: When undertaking problem solving, either on a macro entire problem or a micro part of problem it is not uncommon to think in terms of initialization, repetitivemain processing, and terminationsummarization Your program will need to be structured in this manner, as described below.
Your program should perform the following:
Startup processing
Print a startup message to the user running the program:
S P A R T Y S B R E A K F A S T C A F E
Rewards Calculator
Note: there are no spaces to the left of the first heading line; also, do not include any spaces at the end of either heading line. You should also include a blank line after the text before displaying any user prompts as described below
Initialize summary variables to keep track of:
count of visits
total visit costs
total points earned
Main processing
After program startup, your program should process any number of inputs, each representing a single visit.
You will prompt the user for input and accept the user input. You should display the following prompt for this purpose:
Enter the total cost for the visit, or "DONE" to end input:
Make sure your prompt ends with a blank space and no newline.
Although it is usual and good programming practice, you do not need to perform any data validation on input. For this program you may assume that all input will be valid either a valid dollar amount or the word DONE
If the user inputs DONE, your program should leave the main processing and proceed to summary processing item below
If the user does not enter DONE, you can assume it is a dollar amount for one of the customer's visits. You should then:
Calculate the reward points eaPrint a line that summarizes the visit, including the visit cost and points earned. T
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