In: Computer Science
Use pseudo code to plan a programming solution for the following:
A GUI interface to ensure a user is old enough to play a game. See additional resources above for additional resources.
Properly formatted prompts to input name, address, phone number, and age.
Instructions to ensure that the information is displayed back to the user. Also, the user must be 21. So, include instructions to display an appropriate message about whether or not the user can continue.
Instructions that will allow another user to enter their information.
This assignment requires a loop.
Pseudocode :
Pseudocode is nothing but the plain language description of an algorithm or a program.Pseudocode often uses structural conventions of a normal programming language, but is intended for human reading rather than machine reading.
The case provided in th question is to check whether the boy is eligible to play game.So we need to get the details from him,Then we need to check whether the age is greater than 21, if yes he is eligible to play.
So at first, we need to get all the detais from the user and then check whether age greater.THis will be done in a loop so that if one person is not eligible means another person can enter the details and continue.
Ppseudocode :
Start
Input name , address ,phno , age // The details are entered
Display the details //Details are displayed back to user
Input the limit
for count= 1 to limit by 1 do //Loop to set the limit of access
enter the age
if age>=21 //condition to check if age greater than 21
Display you are eligible to play //if yes eligible
Start game //Game Start
else
Display you are not eligible to play
exit 0 //Exit from game
end if //Ends the if stmt.
end for //Ends the loop
Stop