Question: A programmer has been asked to design and write a program to accept inputs about each game player: name age in years

A programmer has been asked to design and write a program to accept inputs about each game player:

● name

● age in years

● nickname

● if the player wants to use their name or their nickname.

The program must include a validation check on the age, ensure the name and the nickname are no more than eight characters long, then output a personalised welcome message for each player.

There can be three, four or five players for each game; the input routine finishes when all the players have entered their details.

a) Give a suitable identifier name and data type for each input. Explain your choice of data type for each input.

b) Write your design for the program in pseudocode. Include the validation checks for input. Your program must include selection and iteration, use comments to show where these have been used and give the reason why thy have been used.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure Lets tackle the question step by step Part a Identifier Name and Data Type for Each Input 1 Name Identifier playerName Data Type String Explanation The players name needs to be stored as a sequen... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Cambridge International AS & A Level Computer Science Questions!