Paper 1 Cover Page
Paper 1 Cover Page
Paper 1 Cover Page
Question 2 45
Question 3 40
Question 4 31
Total 150
Comments:
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
INSTRUCTIONS AND INFORMATION
Page 2 of 7
SECTION A
QUESTION 1: GENERAL PROGRAMMING SKILLS
SCENARIO:
'BreadCycling' is a business that delivers bread to your door. Instead of the customer going to buy
bread at the store. The purpose of this company is to sell the bread at normal bread prices and
charge a delivery fee of R5.
1. Do the following:
Open the incomplete project file Question1_p in the Question 1 folder.
Enter your name and surname as a comment in the first line of the Question1_u file.
Compile and execute the program. The program currently has no functionality.
NB: Pictures to be used in this program are stored inside the debug folder.
1.1. Open the onChange event of the combo box (cmbChips) and write a Delphi code to
do the following:
1.1.1. Declare a constant variable for the deliver fee and prices of the chips: (1)
simbaChips=18.00;
doritos=22.00;
lays=20.00;
takis=13.50;
niknaks=10.00;
deliveryFee=5;
1.1.2. Update the image (imgChips) to match the text selected in the combo (3)
box. For example, when 'Lays chips' is selected, the image must display
the picture of 'Lays,' and when another option is selected, the image
should change correspondingly to match that selection.
1.1.3. Update the text of the panel (pnlPrice) to match the prices of the selected (2)
chips. The text must be displayed as currency. For example, when 'Lays
chips' is selected, the text of the panel must change to R20.00, and when
another option is selected, the text must change correspondingly to
match that selection.
Page 3 of 7
1.2. BUTTON [Place Order]
1.2.1 Extract the customer name, the chips that they are ordering and the (2)
quantity from the edit boxes and spin edits.
1.2.2 Calculate the amount to be paid (rTotal) for an order using the following (4)
formula:
Amount = Type of bread x Quantity of bread + R5 for delivery.
1.2.3. Display the name, quantity, and total amount to be paid on a memo (2)
component.
1.2.4. Change the picture of the man on the bike (imgDelivery) to the picture (1)
named delivery2.jpg.
Output Example
TOTAL SECTION A: 15
SECTION B
QUESTION 2: FUNCTIONS AND PROCEDURES
Page 4 of 7
2. Do the following:
Open the incomplete project file Question2_P in the Question 2 folder.
Enter your name and surname as a comment in the first line of the Question2_u file.
Compile and execute the program. The program currently has no functionality.
NB: text file to be used in this program is stored inside the debug folder.
2.1. The function calculateRedius and procedure readInformation have been provided
for you.
2.1.1 On calculateRedius- write code to extract the area from the edit box and calculate (5)
the radius of a circle.
2.1.2 On readInformation- Write code to read the text file(instructions) (7)
.
2.2. BUTTON [2.2. Calculate]
Call the function calculateRedius. (2)
2.3. BUTTON [2.3. Display]
Call the procedure readInformation. (1)
Output Example
TOTAL SECTION B: 15
Page 5 of 7
SECTION C
Question 3: DATABASE INFORMATION
3. Do the following:
Open the incomplete project file Question3_P in the Question 3 folder.
Enter your name and surname as a comment in the first line of the Question3_u file.
Compile and execute the program. The program currently has no functionality.
3.1. Extract the name, surname, date, time, and telephone numbers from their (1)
respective components.
3.2. Extract the gender from the radio group based on the user's selection; for example, (2)
if the user selects "Male," the variable must store 'M,' and if the user chooses
"Female," 'F' must be stored.
3.3. Save the user's details into the database. (6)
3.4. Display an appropriate massage to inform the user that their data has been saved. (1)
Output Example
Page 6 of 7
TOTAL SECTION C: 10
SECTION D
Question 4: PROBLEM-SOLVING PROGRAMMING
Scenario
During army training for shooting, trainees use special pistols that can shoot five
bullets at once. They aim these pistols at a target, and if they hit the target, they
pass their training for that day.
4. Do the following:
Open the incomplete project file Question4_P in the Question 4 folder.
Enter your name and surname as a comment in the first line of the Question4_u file.
Compile and execute the program. The program currently has no functionality.
TOTAL SECTION C: 10
Total [50]
Page 7 of 7