SadmanTariq / 2019PrereleaseWithSolution

Solution of variant 2 of the summer 2019 prerelease material.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This solution is made in python3. All three tasks are in their separate files (task1.py, task2.py & task3.py). Install the latest version of python 3 then download this repository as zip from top left to run.

s19_pm22

In preparation for the examination, candidates should attempt the following practical tasks by writing and testing a program or programs.

An auction company has an interactive auction board at their salerooms, which allows buyers to place bids at any time during the auction. Before the auction starts, the sellers place their items in the saleroom 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 saleroom and then place a bid on the interactive auction board at the saleroom. 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.

About

Solution of variant 2 of the summer 2019 prerelease material.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%