Photo AI

Figure 7 shows part of a program written in C# - AQA - GCSE Computer Science - Question 16 - 2021 - Paper 1

Question icon

Question 16

Figure-7-shows-part-of-a-program-written-in-C#-AQA-GCSE Computer Science-Question 16-2021-Paper 1.png

Figure 7 shows part of a program written in C#. bool validChoice; int choice; validChoice = false; while (validChoice == false) { Console.Write("Enter your choi... show full transcript

Worked Solution & Example Answer:Figure 7 shows part of a program written in C# - AQA - GCSE Computer Science - Question 16 - 2021 - Paper 1

Step 1

Normal data

96%

114 rated

Answer

The test data is 5, which is a valid choice within the range of 1 to 10. Therefore, the expected result is a valid choice message displayed.

Step 2

Invalid data

99%

104 rated

Answer

The test data can be any value outside the range of 1 to 10 inclusive. For example, inputs like -1 or 11 should prompt an 'Invalid choice' message.

Step 3

Boundary data

96%

101 rated

Answer

The boundary test data includes values of 0, 1, 10, or 11. Specifically:

  • If 1 or 10 is entered, the program should display a valid choice message.
  • If 0 or 11 is entered, an 'Invalid choice' message should be displayed.

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;