Skip to main content
O-LevelComputer ScienceDatabases2210/22 · May/June 2019 · Q120 Marks

An auction company has an interactive auction board at their sale rooms, which allows buyers to place bids at any time during the auction. Before the auction starts, the sellers place their items in the sale room with a unique number attached to each item (item number). The following details about each item need to be set up on the interactive auction board system: item number, number of bids, description and reserve price. The number of bids is initially set to zero. During the auction, buyers can look at the items in the sale room and then place a bid on the interactive auction board at the sale room. Each buyer is given a unique number for identification (buyer number). All the buyer needs to do is enter their buyer number, the item number and their bid. Their bid must be greater than any existing bids. At the end of the auction, the company checks all the items and marks those that have bids greater than the reserve as sold. Any items sold will incur a fee of 10% of the final bid to be paid to the auction company. Write and test a program or programs for the auction company. • Your program or programs must include appropriate prompts for the entry of data, data must be validated on entry. • 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 - Auction set up. For every item in the auction the item number, description and the reserve price should be recorded. The number of bids is set to zero. There must be at least 10 items in the auction. Task 2 - Buyer bids. A buyer should be able to find an item and view the item number, description and the current highest bid. A buyer can then enter their buyer number and bid, which must be higher than any previously recorded bids. Every time a new bid is recorded the number of bids for that item is increased by one. Buyers can bid for an item many times and they can bid for many items. Task 3 - At the end of the auction. Using the results from TASK 2, identify items that have reached their reserve price, mark them as sold, calculate 10% of the final bid as the auction company fee and add this to the total fee for all sold items. Display this total fee. Display the item number and final bid for all the items with bids that have not reached their reserve price. Display the item number of any items that have received no bids. Display the number of items sold, the number of items that did not meet the reserve price and the number of items with no bids.

  1. (a)All variables, constants and other identifiers must have meaningful names. Describe the data structures you have used in Task 1 to record the items for sale. Include some sample data for each data structure you have described.[5]
  2. (b)Explain how your program for Task 1 ensures the item number is unique.[2]
  3. (c)Write an algorithm for the part of Task 2 that allows the buyer to add a new bid, using either pseudocode, programming statements or a flowchart. Assume that Task 1 has been completed and that the item details have already been found.[5]
  4. (d)Explain how your program for Task 2 checks that a new bid is higher than previous bids for an item.[3]
  5. (e)Explain how your program identifies the items that have reached their reserve price, then calculates and displays the total auction company fee for all sold items as part of 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 2019). The mark or mark type is shown in brackets.

  1. [2] (Data Structure(s) max 2) Arrays
  2. [2] (Data Structure(s) max 2) Variable(s) for // data entry such as reserve price // index / constant for minimum number of items
  3. [3] (Further description max 3) Data type(s) one or more
  4. [3] (Further description max 3) Use(s) one or more
  5. [3] (Further description max 3) Name(s) one or more e.g. Item_Number, NumberBids, Description, Reserve Price
  6. [3] (Further description max 3) Sample data for appropriate arrays e.g. 1234, 0, vase, 20.00 // Sample data for variable or constant e.g. 10
  7. [1] (1 mark for) At least four appropriate named arrays with sample data
  8. [2] Keep a counter/number
  9. [2] Add one every time a new item is added
  10. [2] Keep a list of numbers used
  11. [2] Using a loop check number is not already in the list before a new item number is added
  12. [5] MP1 Enter Buyer Number
  13. [5] MP2 Check if buyer number valid
  14. [5] MP3 Enter new bid
  15. [5] MP4 Check if new bid less than or equal to current highest bid
  16. [5] MP5 ... if so reject
  17. [5] MP6 Otherwise store the bid entered as new highest bid
  18. [5] MP7 Increase number of bids by one
  19. [5] MP8 Store Buyer Number
  20. [5] (Sample answer:) REPEAT PRINT "Enter Buyer Number" INPUT BuyerNumber UNTIL BuyerNumber >= BuyerLow and BuyerNumber <= BuyerHigh REPEAT PRINT "Enter Bid -99 to exit" INPUT Bid IF Bid > HighestBid(item) THEN HighestBid(item) ← Bid NumberBids (item) ← NumberBids(item) + 1 ENDIF UNTIL Bid > HighestBid(item) OR Bid = -99 IF Bid <> -99 THEN BuyerItem(item) ← BuyerNumber ENDIF
  21. [3] MP1 Using index number of item, to find if any bids for item exist
  22. [3] MP2 Using IF/UNTIL/WHILE (statement) to compare new bid with highest/latest bid recorded
  23. [3] MP3 Use an assignment (statement) to replace current highest bid, if new bid greater than current highest bid
  24. [3] MP4 ... else reject bid // using a (REPEAT/WHILE) loop ask for bid to be re-entered
  25. [3] MP5 If number of bids / highest bid = zero add bid (provided greater than zero)
  26. [5] MP1 Method to search item arrays
  27. [5] MP2 Conditional statement used to check for the successful bids
  28. [5] MP3 equal to / greater than reserve price
  29. [5] MP4 Method used to calculate 10% percent of successful bid (for each item)
  30. [5] MP5 ...and add to auction company total fee
  31. [5] MP6 Method used to display total fee with a suitable message

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
Databases, O-Level Computer Science (syllabus 2210). Structured question, 20 marks.
Source
O-Level Computer Science, May/June 2019 Paper 2 Variant 2, 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