ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions
15 marks · Development process and analysis
Analyse the problem and identify all inputs, processes and outputs. Input(s) Process(es) Output(s) Design a user interface for this program. The password must contain 8 characters. State a suitable pre-defined function to check that the password contains 8 characters. Explain why a pre-defined function would be used. Using a design technique of your choice, design an efficient solution to ensure that a password of only 8 characters can be entered. An error message should be displayed if the incorrect number of characters is entered, and the user asked to re-enter the password. Test data will be used to ensure the validation of the password works correctly. Complete the test table below. Input Type of test Expected result Normal Program continues Jaj8up A program is being designed that will allow pupils to add money to their lunch money account. The user enters their name, an 8 character password and the amount of money they want to add. A button is then clicked and the updated balance of the account is displayed.
One mark each for: • all three inputs: – users name - password - money to be added • one processes from: - money added to balance - validate password - retrieve pupil balance • one outputs: - (new) balance Allow additional inputs, processes and outputs that candidates may interpret from the given problem. Text or graphical design showing the following for one mark each: • entry of name, password and money • message showing updated balance • button Length or LEN Any one from: • no need to write code • error free (no need to test) • re-useable Explanation must explain how a pre- defined function shortens code (time reduced in development of code as function prewritten/tested). One mark each for design of input validation showing: • conditional loop used • correct loop condition for valid data • input of reading • error message Condition will change depending on whether While or Until loop used: While password is not 8 characters Until password is 8 characters Award 1 mark for input not implemented within loop. Allow for language variations. For example: input and error message may be combined in a single statement. One mark for each correct row: Type of test Input Expected Result Normal Any 8 character string. For example: K458fd23 Program continues Exceptional Jaj8up Error message Or User asked to re-enter password