33Hard
0/7

A control system program is to be written to authorize access to a secure server room using a dual-factor login: an Employee ID and a corresponding PIN.

Table 1 shows the only two authorized pairs of Employee IDs and PINs.

Employee IDPIN
Tech4049182
Admin7073546

Write a C# program to authorize access based on the Employee ID and PIN.

The program should:

  • Ask the user to input an Employee ID
  • Ask the user to input a PIN
  • Display the message Entry Denied if the Employee ID and PIN pair entered is not authorized
  • Display the message Entry Approved if the Employee ID and PIN pair entered is authorized
  • Repeat these steps until an authorized Employee ID and PIN pair is entered.

You should use meaningful variable names and correct C# syntax in your answer.

[7]

Programming concepts Questions

Practise AQA GCSE Computer Science Programming concepts with exam-style questions for GCSE Computer Science. 100 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Programming concepts Questions

  1. GCSE
  2. /Computer Science
  3. /Programming concepts