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
-
Explain life - cycle analysis and how organizations are using it to pay more attention to the total environmental impact.
-
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...
-
Why is an oil quench less likely to produce quench cracks than water or brine?
-
Explain why the function is differentiable at the given point. Then find the linearization L(x, y) of the function at that point. f(x, y) = e xy cos y, (7,0)
-
Presented below are common-sized income statement data for three well-known companies representing three different industries (pharmaceutical, beverage, and diversified): 1. Bristol-Myers Squibb 2....
-
1. How should Bobbi approach Paul about the situation? 2. What do you think Pauls reaction(s) will be? 3. Do you agree with the companys policy of promoting only college graduates to the maintenance...
-
3. What reference provides policies, procedures, and standards for use in the evaluation of a contractor's material management and accounting system (MMAS)? a. Federal Acquisition Regulation (FAR)...
-
Preble Company manufactures one product. Its variable manufacturing overhead is applied to production based on direct labor-hours and its standard cost card per unit is as follows: Direct material: 5...
-
You have been approached by a client to design trading algorithms. The goal is to buy 100,000 shares of a reasonably liquid ASX-listed stock XYZ which has an average daily trade volume of 500,000 (9...
-
Ms. Maya Regierk wants to transfer the assets of her unincorporated wholesaling business to a newly incorporated company of which she is the only shareholder. She has just received the proforma...
-
3) Consider the following formula: Var(B;)= 0 SST, (1-R}) (5 points) a) Explain what each term: Var(B), o, SST, and Rn means; formulas are optional if your explanation is good. b) What is the...
-
European policymakers object to the fact that some Asian shoe production is government-subsidized. But as an editorial in the Financial Times noted "If Beijing and Hanoi want to subsidize European...
-
Question 5 Not complete Shea Company reported raw material purchases of $1,400, paid $1,200 in factory labor, and incurred and applied $900 in factory overhead for March. The March 1 inventory...
-
Fraudulent misrepresentation is a business tort review this hypothetical to determine whether there was a fraudulent misrepresentation: You own the e-business "Best Products Ever;" you go around the...
-
Assume that you are estimating the current cost of a Class D wood frame building that cost $80,000 in 1975. Your cost index chart for this type of building at this location shows a current-year index...
-
Suppose the government bond described in problem 1 above is held for five years and then the savings institution acquiring the bond decides to sell it at a price of $940. Can you figure out the...
-
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...
-
Table 11-2 lists the various activities performed in the expenditure cycle and the journal entries, documents, data, and control issues associated with them. Complete each of the cell entries in this...
-
Match threats in the first column to appropriate control procedures in the second column. Threat 1. Failing to take available purchase discounts 2. Receiving unordered goods 3. Recording and posting...
-
a. Create a spreadsheet to reconcile bank statements. Organize it as follows: i. Ending balance, per bank statement ii. Deposits not included in bank statement (provide space for up to 7) iii. Checks...
Study smarter with the SolutionInn App