To assist the organizers of a new program where students, faculty, and staff will earn rewards...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
To assist the organizers of a new program where students, faculty, and staff will earn rewards for riding a bike to campus, you are tasked with calculating how many points someone has earned based on the number of rides they have completed. rewardPoints.cpp contains several functions. runProgram is a void function with no parameters. It is simply the function that the main function will call. printResult will take one argument: the number of points earned. It will print the result of the given calculation. calculatePoints will take one argument: the number of bike rides taken to campus, and return one value: the number of rewards points earned based on the number of bike rides. Table I shows how points are calculated. Rides Completed Points Earned 0 3 0 1 2 3 4 > 5 Table 1: Bike Reward Points 10 15 30 50 2.1 Sample Run Sample Run ./reward Points .out How many rides did you complete? 4 You have earned 30 points. #include "reward Points.h" #include #include #include #include #include using namespace std; /* Purpose: Functions to calculate reward points earned based on bike rides completed */ int main(int argc, char* argv [] ) { runProgram (); return 0; } void runProgram () { } void printResult(int points ) { } return; } return; int calculatePoints(int rides ) { return -1; #ifndef REWARDPOINTS H #define REWARDPOINTS H using namespace std; Purpose: Functions to calculate reward points earned based on bike rides completed void runProgram (); void printResult(int points ); int calculatePoints(int rides); #endif To assist the organizers of a new program where students, faculty, and staff will earn rewards for riding a bike to campus, you are tasked with calculating how many points someone has earned based on the number of rides they have completed. rewardPoints.cpp contains several functions. runProgram is a void function with no parameters. It is simply the function that the main function will call. printResult will take one argument: the number of points earned. It will print the result of the given calculation. calculatePoints will take one argument: the number of bike rides taken to campus, and return one value: the number of rewards points earned based on the number of bike rides. Table I shows how points are calculated. Rides Completed Points Earned 0 3 0 1 2 3 4 > 5 Table 1: Bike Reward Points 10 15 30 50 2.1 Sample Run Sample Run ./reward Points .out How many rides did you complete? 4 You have earned 30 points. #include "reward Points.h" #include #include #include #include #include using namespace std; /* Purpose: Functions to calculate reward points earned based on bike rides completed */ int main(int argc, char* argv [] ) { runProgram (); return 0; } void runProgram () { } void printResult(int points ) { } return; } return; int calculatePoints(int rides ) { return -1; #ifndef REWARDPOINTS H #define REWARDPOINTS H using namespace std; Purpose: Functions to calculate reward points earned based on bike rides completed void runProgram (); void printResult(int points ); int calculatePoints(int rides); #endif
Expert Answer:
Related Book For
Statistics The Exploration & Analysis Of Data
ISBN: 9780840058010
7th Edition
Authors: Roxy Peck, Jay L. Devore
Posted Date:
Students also viewed these algorithms questions
-
Janus Products, Inc. is a merchandising company that sells binders, paper, and other school supplies. The company is planning its cash needs for the third quarter. In the past, Janus Products has had...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The firm is considering between two mutually exclusive projects, Project A and Project B, that each require an upfront investment of $100m and are expected to produce free cash flow (FCF) only at the...
-
Explain the differences between tacit and explicit collusion.
-
Create a forest plot of these data. Mazzucchelli, Kane, and Rees (2010) examined studies of behavioral activation as a way to improve feelings of subjective well-being. (They defined behavioral...
-
When you buy fresh flowers, you should cut the stems underwater to prevent an air bubble from forming in the xylem. What would happen if an air bubble entered the xylem?
-
Oerstman, Inc., uses a standard costing system and develops its overhead rates from the current annual budget. The budget is based on an expected annual output of 120,000 units requiring 480,000...
-
The Alpine House, Incorporated, is a large retailer of snow skis. The company assembled the information shown below for the quarter ended March 31: Sales Selling price per pair of skis Variable...
-
Computer Project Exercises In developing the exercises, trade-offs had to be made to enrich the learning experience. One of the major problems students initially encounter is data and detail...
-
In a fixed time, a man swims double the distance along the current that he swims against the current. If the speed of the current is 3 km/hr, the speed of the man in still water is 1. 6 km/h 2. 9...
-
A spokesperson for an organization that provides microloans to women in developing countries said, "Our clients are three times more likely to start a business than other women in their villages. Our...
-
Today is Apr 29. GOOG will report earnings tomorrow, on Apr 30. AMZN will report earnings one week later. The probability that AMZN misses earnings (i.e., reports lower earnings than analysts expect)...
-
Suppose it costs $52,000 per year to live in City A. It costs $90,000 to live in City B. If you are offered $69,000 to work and live in City A, what salary would you need to be offered in City B to...
-
Referring to the five of Deming's points (6,7,8,10, and 13) that relate directly to the notion of empowerment, which is the most important of the points and why?
-
Provide information with sources and examples for a learner guide on 3.1 Maintain Stocks as per Company's SOP Step 1: Understand the company's Standard Operating Procedure (SOP) for maintaining...
-
The profit before tax, as reported in the income statement of Uwu Corporation for the year ended December 31, 2020. amounted to P1.920,000, including the following revenue and expense items: Rent...
-
What are the principal differences among asset liquidity management, liability management, and balanced liquidity management?
-
The paper Population Pressure and Agricultural Intensity (Annals of the Association of American Geographers [1977]: 384396) reported a positive association between population density and agricultural...
-
The article Portable MP3 Player Ownership Reaches New High (Ipsos Insight, June 29, 2006) reported that in 2006, 20% of those in a random sample of 1112 Americans age 12 and older indicated that they...
-
The accompanying frequency distribution summarizes data on the number of times smokers who had successfully quit smoking attempted to quit before their final successful attempt (Demographic...
-
Martinez Company incurred the following costs during 2015 in connection with its research and development activities. Instructions Compute the amount to be reported as research and development...
-
For each of the following studies, identify the type of graph (histogram, time series graph, or scatter diagram) that would be the most appropriate. (You can use more than one graph of each type, for...
-
Explain the difference between artistic-related intangible assets and contract-related intangible assets.
Study smarter with the SolutionInn App