Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Array1: ItemNumbers(10)
Data Type: Integer
Purpose: To store the item numbers of items in Auction.
Array 2: ReservePrice(10)
Data Type: Real or Double
Purpose: To store the item Reserve Price of items in Auction.
Array 3: ProductDescription(10)
Data Type: String
Purpose: To store the item description of the items in Auction.
Name three variables that you have used in Task 1, Task2 or Task 3 and state the purpose of
each one.
Variable 1: BidPrice
Data Type: Real or Double
Purpose: To input the bid price of item’s bid
Variable 2: Choice
Data Type: Char
Purpose: To input the choice of buyer, whether he wants to bid or not?
Name two constant you used for Task 1, Task2 or Task 3 and state the purpose of each one.
Constant 1: NumItems = 10
Data Type: Integer
Value = 10
Purpose: Constant is used to store the total items in Auction
1
Computer Science 2210
PRE-RELEASE MATERIAL May/June 2019 O-level(2210)
with Majid Tahir
Q2(a) Explain how your program for Task 1 ensures that Item Number is unique.
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
....................................................................................................................................... [2]
Answer:
CONSTANT NumItems As Integer = 10
For count = 1 To NumItems
ItemNumbers(count) = count // Automatically gives a unique item Number
Next
(b) Explain how your program for Task 2 ensures that Item Number is not selected out of range
by Buyer for bidding.
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
....................................................................................................................................... [2]
Answer:
OUTPUT ("Please Enter the Item Number of Product you want to bid")
INPUT Number
While Number <> 1 And Number <> 2 And Number <> 3 And Number <> 4 And Number <> 5
And Number <> 6 And Number <> 7 And Number <> 8 And Number <> 9 And Number <> 10
OUTPUT ("ERROR,ItemNumbers MisMatched, Enter valid Item Number")
INPUT Number
End While
(c) Describe, with the aid of some sample data, the data structures that you have used to record
the data for the ItemsDescription and ReservePrice in Task 1.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
.......................................................................................................................................[4]