ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions

N5 Computing Science 2022 Question 10

12 marks · User-interface design

Using the information above, design a user interface for the program. State the part of the processor that will perform the calculation once the program is implemented. State the part of the processor used to temporarily store the result of the calculation. Sam completes five jobs in July and earns the following. £562.77, £675.44, £287.91, £245.22, £899.66 The following section of code calculates Sam’s monthly earnings for July. Line 1 DECLARE total INITIALLY 0.0 Line 2 DECLARE job1 INITIALLY 0.0 … Line 7 RECEIVE job1 FROM KEYBOARD Line 8 RECEIVE job2 FROM KEYBOARD Line 9 RECEIVE job3 FROM KEYBOARD Line 10 RECEIVE job4 FROM KEYBOARD Line 11 RECEIVE job5 FROM KEYBOARD Line 12 SET total TO = job1 + job2 + job3 + job4 + job5 Line 13 SEND "Total Monthly Earnings £" & total TO DISPLAY … When evaluating this code, it is found to be inefficient. Using a programming language of your choice, re-write Lines 7 to 12 of the code using more efficient constructs. The values for the five jobs should remain stored for use after Line 12. Sam takes pictures of floor layouts using a tablet device. The images are stored as bit-mapped graphics. Describe how a bit-mapped graphic would be stored. Describe one way that Sam could reduce the energy consumption of the tablet. Sam is creating a program to calculate and display the total cost of laying new flooring. Flooring is charged at £15 per square meter and skirting boards are charged at £60 per room. The total cost is calculated by multiplying the total floor area by 15, then adding the number of rooms requiring skirting multiplied by 60.

Marking scheme

One mark each for • entry of floor area with user instruction and input area • entry of number of rooms requiring skirting with user instruction and input area • total cost with label Input area and user instruction may be combined within one box. Award 0 marks if the candidate has designed a program (pseudocode, flow chart, structure diagram) rather than a user interface. Ignore any additional objects/ text/buttons that may have been added to the user interface. ALU or Arithmetic Logic Unit registers One mark each for • loop 5 times • input of job assigned within loop • running total within loop • correct use of array Number of loop iterations declared may vary according to language, eg 0 to 5, 1 to 5, 0 to 4, 1 to 6 To avoid double penalising, along with bullet point two, award mark for correct use of an array once in the answer. One mark each for • each pixel • is stored as a binary value (bits) Binary must be related to each pixel. One mark for any one from • reduce brightness of screen • power down settings • switch off when not in use • close down un-used apps/windows Terminology used in answers may vary.

Previous question: N5 Computing Science 2022 Question 9

Next question: N5 Computing Science 2022 Question 11