The aim of this activity is to produce a computer program which will help students in year 9 practise working out the area of shapes.
The teacher wants a way of recording when each student has used the program and so students must
login to the program when they run it. The program must work in the following way:
- A student registers by choosing:
- a username
- and creating a password, of appropriate strength
- a username
- Once logged in, a menu of shapes is displayed from which the student can choose the shape
they wish to practise. Shapes could include a triangle, rectangle, or circle.
- The dimensions of the chosen shape are displayed, along with four possible values for the area.
One of the possible values is the correct answer, and the other three are incorrect.
- The student must choose one value for the area.
- The scoring must work as follows:
- If the student chooses the correct answer they score 2 points
- If they choose one of the incorrect answers, a feedback comment is displayed and they
have another chance
- If the student chooses the correct answer this time, they score 1 point
- If they choose an incorrect answer again, a feedback comment is displayed together with
the correct answer, and the option of answering another question, or quitting the trainer
- If the student chooses the correct answer they score 2 points
- The student’s total score for the session should be recorded in an external file along with the
scores from previous sessions.
- When quitting the trainer, the student’s total score for the current session is displayed and they
are offered the following options:
- starting again
- looking at the record of their scores from their previous sessions
- closing the program
- starting again
- Validation of user inputs
- The use of random numbers
- File input/output to handle the storage of usernames and passwords and of scores
- Considering password strength
- Well-designed, structured code using subroutines and interfaces
- Error handling techniques