Archie wants a program that calculates and displays a team’s final score in a football game, given the numbers of the team’s field goals, touchdowns, one-point conversions, two-point conversions, and safeties. First, create an IPO chart for this problem, and then desk-check the algorithm twice. For the first desk-check, use 3, 2, 2, 0, and 1 as the numbers of field goals, touchdowns, one-point conversions, two-point conversions, and safeties. For the second desk-check, use your own set of data. After desk-checking the algorithm, list the input, processing, and output items in a chart similar to the one shown in Figure 3-25, and then enter the appropriate C++ declaration statements
Fig 3.25
IPO chart information C++ instructions
Input latexprice
Mylar price
latex purchased
Mylar purchased
sales tax rate (6%)
Processing
total latex cost total Mylar costs
sub total sales tax
Output
total cost
IPO CHART INFORMATION
INPUT:
field goals
touch downs
one point conversation
two point conversation
safeties
PROCESSING:
total team score
OUTPUT:
display total score
C++ INSTRUCTIONS:
OUTPUT: double totalScore=0.0;
PROCESSING: double totalteamScore=0.0;
INPUT: double fieldGoals=0.0;
double one-point convo=0.0;
double two-point convo=0.0;
double touchdown=0.0;
int safeties;
Get Answers For Free
Most questions answered within 1 hours.