Skip to main content
O-LevelComputer ScienceProgramming2210/21 · May/June 2018 · Q120 Marks

Here is a copy of the pre-release material. DO NOT attempt Tasks 1, 2 and 3 now. Use the pre-release material and your experience from attempting the tasks before the examination to answer Question 1. Pre-release material A computer shop will build a computer from components to meet a customer's requirements. For each request for a computer to be built, an estimate of the cost is produced. The component stock level is checked; if all the components are in stock, a firm order to build the computer can be placed. A program is required to work out the cost of the computer, update the stock levels and provide a daily summary of orders for the shop owner. Write and test a program or programs for the computer shop owner. * Your program or programs must include appropriate prompts for the entry of data. * Error messages and other output need to be set out clearly and understandably. * All variables, constants and other identifiers must have meaningful names. You will need to complete these three tasks. Each task must be fully tested. TASK 1 – Produce an estimate. Write a program for TASK 1 to calculate the cost of building a computer using these components. | Component | Choices | Prices in $ | |-----------|-------------------------|-----------------| | Processor | p3 / p5 / p7 | 100 / 120 / 200 | | RAM | 8GB / 16GB / 32GB | 75 / 150 | | Storage | 1TB / 2TB | 50 / 100 | | Screen | 19" / 23" | 65 / 120 | | Case | Mini Tower / Midi Tower | 40 / 70 | | USB ports | 2 ports / 4 ports | 10 / 20 | The customer makes a choice for each component and an estimate is produced. The estimate must show a unique estimate number, the components chosen and the price of each component. The estimate must also show the total cost of the computer, which is calculated as the sum of the cost of the components chosen plus 20%. TASK 2 – Place an order. Using your estimate from TASK 1, check if the components required are in stock. If all the components are in stock then update the stock levels. Add the unique estimate number to the list of order numbers. Add the customer's details and today's date to the estimate details to finalise the order. Print two copies of the order, one for the customer and one for the shop. TASK 3 – Summarise the day's orders. Extend TASK 2 to provide an end of day summary showing the number of orders made, the total number of each component sold and the value of the orders.

  1. (a)(i)You recorded information for the estimate of the cost of building a computer in Task 1. Give a data structure that you created for Task 1, its name, data type and use.[4]
  2. (a)(ii)Describe the data structures that you have used in Task 2 to record the customer details. Include sample data in the description.[4]
  3. (b)Explain how your program for Task 1 produces a unique estimate number.[2]
  4. (c)Write an algorithm for part of Task 2 to check that the chosen processor and chosen RAM are in stock, using either pseudocode, programming statements or a flowchart. Assume that Task 1 has been completed. Do not check the other components or produce the order.[5]
  5. (d)Explain how your program completes Task 3. Any programming statements used in your answer must be fully explained.[5]

Mark scheme

Marking points from the official mark scheme (May/June 2018). The mark or mark type is shown in brackets.

  1. [1] (a)(i) Data structure: Array
  2. [1] (a)(i) Name: processor
  3. [1] (a)(i) Data type: string
  4. [1] (a)(i) Use: to store processors currently available
  5. [1] (a)(ii) Data structure given
  6. [1] (a)(ii) Data type
  7. [1] (a)(ii) Sample data
  8. [1] (a)(ii) More than one data structure described
  9. (a)(ii) e.g. Three arrays containing string data with name, address and phone number – John Smith, Cambridge, 01223 123456
  10. [1] (b) Use a previously stored number//generates/uses an initial value
  11. [1] (b) Update it (by 1) every time an estimate is made
  12. [1] (c) Initialise (stock level) flag
  13. [1] (c) Check stock level for the chosen processor type
  14. [1] (c) Only check RAM if processor available // Only check processor if RAM available
  15. [1] (c) Check stock level for the chosen type of RAM
  16. [1] (c) Finish process if problem with (RAM/Processor) stock levels
  17. [1] (c) Identify out of stock (processor/RAM)//Set flag to appropriate value
  18. [1] (c) Identify stock level OK//Set flag to appropriate value
  19. [1] (d) How the number of orders was calculated
  20. [1] (d) Deal with the case where the estimate has not been turned into an order
  21. [1] (d) Calculating the total number of each component sold
  22. [1] (d) Details of method actually used to calculate numbers of components
  23. [1] (d) How the total value of all the orders was calculated
  24. [1] (d) Display summary
  25. [1] (d) Display complete summary of number of orders, total number of components and total value of orders
  26. (d) Programming statements can be used but must be explained to gain credit.

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
Programming, O-Level Computer Science (syllabus 2210). Structured question, 20 marks.
Source
O-Level Computer Science, May/June 2018 Paper 2 Variant 1, question 1.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep