Mabel is a software engineer. She is writing a computer game for a client. In the game the main character has to avoid their enemies. This becomes more difficult as the levels of the game increase.
The computer game allows a user to select a character (e.g. name, gender). They can then choose a level for the game (easy, normal, challenging). The user controls their character by moving it left or right. The character can jump using space bar as an input. If the character touches one of the enemies then it loses a life. The character has to make it to the end of the level without losing all their lives.
- The game is designed in a modular way.
- One sub-procedure will handle the user input.
Describe three other sub-procedures Mabel could create for the given game description. [6]
ANSWER
Mabel could create a sub-procedure to select a character, including name and gender, etc [1], which gives the user options when choosing a character [1]
Mabel could create a sub-procedure to choose a level [1] which gives the user a choice of difficulty (easy, medium, challenging) by taking the user input [1]
Mabel could create a sub-procedure to allow the character to lose lives [1]. If the character has less than 0 lives left then the game ends [1]