Question 4
AQA Computer Science June 2025 Paper 1C (8525/1C)GCSE13 marks
On the specification
- 4.1
- 3.2 Programming
- 4.2
- 3.2 Programming
- 4.3
- 3.2 Programming
- 4.4
- 3.2 Programming
- 4.5
- 3.2 Programming
- 4.6
- 3.1 Fundamentals of algorithms3.2 Programming
Question text
4 A programmer is developing a system to register users for an app. The program box needs to validate the first name of the user. 4.1 Identify the purpose of validation. Shade one lozenge. [1 mark] A Checks that the user is human B Checks that the user is who they say they are C Checks that the input is a name D Checks that the input is reasonable 4.2 Write a VB.NET program to check the user’s first name. Your program should: • get the user’s first name • check that the first name has more than one character and fewer than 15 characters: o if it has, output the message Name accepted o if it has not, output the message Name not accepted • repeat until the name entered has a specified length. You should use meaningful variable name(s) and VB.NET syntax in your answer. The answer grid below contains vertical lines to help you indent your code. [6 marks] 4.3 Which of the following statements best describes boundary test data? box Shade one lozenge. [1 mark] A Data that is not of the allowed data type B Data that is at the limits of the allowed range C Data that is expected by the program D Data that will cause a syntax error 4.4 The programmer has started planning the tests that will be used to check the program is working correctly. The program should: • check that the first name has more than one character and fewer than 15 characters: o if it has, then output the message Name accepted o if it has not, then output the message Name not accepted The start of the test plan is shown in Figure 3. Figure 3 Test Type of Test data Expected result number test data 1 Thomas Normal Name accepted 2 Boundary Name not accepted State the number of characters that a string used for test number 2 in Figure 3 could contain. [1 mark] 4.5 Normal and boundary are two types of test data. State one type of test data that has not been used in Figure 3. [1 mark] 4.6 A programmer is designing an algorithm to generate usernames for users. box The algorithm should: • ask the user to input their first name and their last name • create a username: o if their first name has more than three characters, their username will consist of the first three characters of their first name followed by their last name o if their first name has three or fewer characters, their username will consist of their full first name followed by their last name • output the username. Figure 4 contains the statements required to implement a version of this algorithm. Figure 4 firstName USERINPUT LEN(firstName) > 3 username firstName + lastName OUTPUT username username SUBSTRING(0, 2, firstName) + lastName lastName USERINPUT Using the labels ( to ) shown in Figure 4, complete the flowchart to implement the algorithm. [3 marks]