Program 3 Grading Codes
- Incorrect answers - check your arithmetic!
- Variable(s) undefined or incorrect if no bonus (you probably need an ELSE clause on an IF statement),
or calculation produces wrong answers if Total_fuel < Bonus (watch out for negative bonus!),
or variable undefined if no data (a variable is defined inside the WHILE loop that isn't defined if the loop is skipped).
- Bad output layout. Includes spelling and allignment problems.
- No documentation
- Insufficient documentation
- No prologue
- Insufficient prologue
- Bad indentation or other style problems.
- Magic numbers (like 8, 2, 0.5, 100, 60, 'Invalid')
- Wrong OT rate - print the average BEFORE dividing by 2.
- Calculation fails if Total_fuel = 0 (most likely you divide by 0).
- Poor variable names. Avoid names like Eight or BFT. Also avoid Regular = 'Regular'.
- Pull some of these statements out of CASE, and put them after the CASE.