Question 7
Edexcel Computer Science June 2018 Paper 2GCSE16 marks
On the specification
- (a)
- 1.2 Algorithms
- (b)(iv)
- 1.2 Algorithms6.2 Program constructs
Question text
7 P-Cubed uses automatic sorting machines. (a) Letters are unloaded onto an automatic sorting machine. The machine weighs each letter. Letters are sent along different paths based on their weight. After 1000 letters are sorted, a bell is sounded to alert an operator to load more letters. 1 to 100 grams Green path 101 to 750 grams Yellow path 751 grams or more Red path to larger sorting machines Here are some flowchart symbols. Open yellow Open red path count = count + 1 path weight <= weight <= 100 grams? Open green path 750 grams? Yes No Complete the flowchart to implement the letter sorting algorithm by using the symbols provided. Use all the symbols. Use each symbol only once. Use as many arrows and Yes/No labels as required. This flowchart symbol is used to show input or output. (6) Start count = 0 weight count = No 1000? Yes Sound Bell End (b) P-Cubed stores data about the sorting machines in tables. The primary key field for each table is shown in bold. (i) State the purpose of a primary key in a database table. (1) (ii) State the foreign key in tbl_Production. (1) (iii) There is a one-to-many relationship between these tables. Complete the diagram to show this relationship. (2) tbl_Machines tbl_Production MachineNumber ProductionID PurchaseDate MachineNumber ServiceDate EntryDate MachineName ShiftNumber OperatorNumber CountSorted (iv) Each year, P-Cubed gives an award to the operator who has sorted the most letters. It uses the records in tbl_Production to find the award winner. Construct a flowchart to show an algorithm that outputs the total number of letters sorted by a single operator. The operator number is provided. (6) (Total for Question 7 = 16 marks)