Example 15
A large electronic scoreboard in a sports stadium
displays the scores of the two teams during a match. At
the end of the game we want it to display a
'congratulations' message to the winning team. A program
is required which asks the user to enter the names of the
two teams and the number of points scored by each. The
program will then print out an appropriate message.
1. Design a Solution
- as before, design a suitable solution
- show the completed design to your teacher
2. Code the Program
- type in the code for your program
- save it as scores.pas
- compile and run the program
3. Test the Program
- use suitable data to test your program and note
the results
There is an obvious flaw in the specification. Does
your test data reveal the problem? See your teacher if
you're not sure.
4. Evaluate the Solution
Can you describe the problem with the design and
suggest how it might be solved?
- write an evaluation note and indicate
improvements that could be made
|