Question 11
AQA Computer Science June 2024 Paper 1A (8525/1A)GCSE7 marks
On the specification
- 3.2 Programming
Question text
11 A program is to be written to authenticate a username and password entered by the box user. Figure 9 shows the only two pairs of valid usernames and passwords. Figure 9 Username Password Yusuf5 33kk Mary80 af5r Write a C# program to authenticate a username and password. The program should: • get the user to enter a username • get the user to enter a password • display the message Access denied if the username and password pair entered is not valid • display the message Access granted if the username and password pair entered is valid • repeat until a valid username and password pair is entered. You should use meaningful variable name(s) and C# syntax in your answer. The answer grid below contains vertical lines to help you indent your code accurately. [7 marks]