Activity: Total Bases

This activity will provide you and your team with further experience in problem definition and algorithm/flowchart design. This activity will also provide further experience in using conditional selection logic in algorithm/flowchart design. At the end of this activity, you will…

  • Be able to create a functional description of the problem including input and output specifications.
  • Be able to construct processing steps to obtain the output from the input.
  • Be able to document the functional description of the problem as flowchart comments.
  • Be able to utilize desk checking as a basic testing methodology and debugging tool.

The Problem

Professional baseball has many statistical measures of performance. One measure of offensive effectiveness in baseball is the Total Bases (TB) statistic. This simple statistic is kind of like a weighted batting average. TB is calculated as follows:

TB = (Singles + [2 x Doubles] +[ 3 x Triples] + [4 x Home Runs])

For example, in 2001 Barry Bonds had 73 Home Runs, 32 Doubles, 2 Triples, and 49 Singles. Therefore, his TB statistic was…

 TB = 49 + [2 x 32] + [3 x 2] + [4 x 73]
    = 49 + 64 + 6 + 292
    = 411

The Assignment

Create a flowchart that allows a player to compute his TB statistic. The algorithm should report his effectiveness according to the following criteria:

TB Range Effectiveness Rating
[0…100] Poor
[101…200] Moderate
[201…300] Good
301 or more Excellent

 

Submit your flowchart as directed by the instructor.