ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions
13 marks · Design techniques
Pseudocode was used to design the program. State another technique that could be used to design the program. The software development process is described as iterative. Explain why it may be necessary to return to the design stage. The user can search for properties priced from £50,000 to £600,000. Using a design technique of your choice, design an efficient solution to check that the price entered is valid. Test data is used to ensure the validation of the price entered works correctly. Complete the test table below with one appropriate numerical value for each input. Type of test Input Expected result Extreme Program continues Exceptional Program displays an error message A username and password are added to allow users to save searches. Part of the code is shown below. … Line 9 RECEIVE un FROM KEYBOARD Line 10 RECEIVE pwd FROM KEYBOARD Line 11 IF un = sUn OR pwd = sPwd THEN Line 12 SEND "Welcome to saved searches" TO DISPLAY Line 13 END IF … Explain how indentation is used to make the code above more readable. Describe how Line 11 could be made more readable. A user enters the password below. GRK_0183_J State how many bits would be required to store the password using extended ASCII code. Line 11 should have used AND instead of OR. State the type of error that using OR would cause when the program is executed. After final testing, the program is run without requiring any further translation software. State the type of translator that has been used. A program is being designed to allow users to search for properties for sale.
One mark for any one from • flow chart • structure diagram One mark for any one from • logic errors were found at a later stage • new functionality is requested • the program is not fit for purpose Wording will vary. Accept other appropriate examples. Do not accept “check for errors”. One mark for each design of input validation showing • conditional loop • correct loop condition for valid data • input of price inside loop • error message If there is no loop: • one mark may be awarded for input • one mark may be awarded for error message if inside an if statement with correct conditions If the loop is missing the start/end of the loop assume that everything above or below the start/end is inside the loop. While minimum < 50000 OR maximum > 600000 Until minimum >= 50000 AND maximum <= 600000 As this is design accept between 50000 and 600000 One mark for one extreme value from • 50000 • 600000 One mark for one numerical exceptional value • less than 50000 • more than 600000 Marking should focus on the numerical values and may ignore spaces or commas that candidates may add. One mark for any one from • used to show the start and end of the if structure • to clearly show what code is inside the if statement Answer must relate to “the code above” so should reference the if statement or line 12. One mark for any one from • (add an) internal comment • (use) meaningful variable names 80(bits) logic compiler