ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions
11 marks · Design techniques
State the design technique that has been used to design the solution. To implement the program several programming constructs will be required. State the condition used in the loop construct. State one other construct that has been used in the design and describe how that construct has been used. Construct Description When the wash is finished, the water will drain out. A sensor continuously detects the amount of water in the machine during the draining process. When there is no more water in the machine the door will automatically open. Using a design technique of your choice, design a solution to this problem. When the program is implemented, the water temperature will be stored in the memory of the washing machine’s built-in computer. State the bus used to transfer the stored water temperature to the processor. Explain how a computer system organises data in memory so that it can be retrieved. The finished program was compiled before it was stored in the washing machine’s memory. Explain why this program was compiled. A program to control the water temperature inside a washing machine is being designed. The user will select a wash temperature using the control panel on the machine. The program should ensure that the water stays heated at the correct temperature throughout the wash. The design for the part of the program that maintains the water temperature is shown below. ... get water temperature from sensor Yes is temperature of water < wash temperature? No switch water heater switch water heater on off No is wash finished? Yes ...
Flow chart Is wash finished? Exact wording is not required. Any one from • assignment • arithmetic operation • conditional (if) statement One mark for a description of the effect of the above construct, in context. Do not accept “loop” as this is stated in part (i). The second mark, for description, can still be awarded in this case. If the construct is described, rather than named, a mark may still be awarded for a correct description. One mark each for • loop with condition • (sensor) detects water level • open door when no more water Do not allow human input of water level. Data One mark each for • separate locations/addresses • unique Any one from • It requires no further translation • The translator does not need to be in the memory of the washing machine