0% found this document useful (0 votes)
9 views7 pages

Gr10 Nov 2022 Itp1

Uploaded by

raheelgop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views7 pages

Gr10 Nov 2022 Itp1

Uploaded by

raheelgop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

APOLLO SECONDARY SCHOOL

NOVEMBER TESTS – 2022


INFORMATION TECHNOLOGY – P1
GRADE 10
MAX MARK : 100 DURATION : 2 Hours
EXAMINER : N Brijlal MODERATOR : K Anthony

INSTRUCTIONS
1. This question paper is set with programming terms that is specific to the Delphi
programming language

2. Make sure that you answer the questions according to the specifications that are given in
each question. Marks will be awarded according to the set requirements.

3. Answer only what is asked in each question. For example, if the question does not ask for
data validation, then no marks will be awarded for data validation.

4. Your programs must be coded in such a way that they will work with any data and not just
the sample data supplied or any data extracts that appear in the question paper.

5. Routines, such as search, sort and selection, must be developed from first principles. You
may NOT use the built-in features of a programming language for any of these routines.

6. All data structures must be defined by you, the programmer, unless the data structures are
supplied.

7. You must save your work regularly on the disk/CD/DVD/flash disk you have been given, or
on the disk space allocated to you for this examination session.

QUESTION 1 : General Programming

Open the project Quest1_p with the GUI as shown below :

1|Page
Code the following :

1.1 On Activate

Write Code to change the following properties of the panel pnlQ1_1


• Change the colour of the panel to red
• Change the font size to 16
• Change the font colour to white
• Change the text on the panel to display “IT Practical 2022” (5)

1.2 Button VAT


Do the following, using variables where necessary :
• Read the cost price from the edit edtCostP
• Determine the selling price, which includes 15% VAT
• Display the Selling Price in the edit edtSellingP in currency format (5)

1.3 Button Convert Time

Read the time given in minutes from the edit edtTime. Convert the time to hours and
minutes. Display the time in hours and minutes in the memo memQ1_2. (6)

SAMPLE OUTPUT

1.4 A Body Mass Index (BMI) is a calculated value based on a person’s mass (kg) and height
(in m).The BMI can be used to indicate if the person is Overweight

2|Page
1.4.1 Button BMI
Calculate the BMI of the person by reading in the mass from the spin-edit sedMass
and the height from edit edtHeight. Calculate the BMI using the formula :
𝑚𝑎𝑠𝑠
BMI =
ℎ𝑒𝑖𝑔ℎ𝑡 2

Display the BMI value in the edit edtBMI, correct to ONE decimal place (6)

SAMPLE OUTPUT

1.4.2 Button Check


The following table will classify the person’s health status based on the BMI value

BMI Value Status


< 18 Under Weight
Between 18 and 25 Normal
> 25 Overweight

Read the BMI value from the edit edtBMI and determine the status of the person.
Display the appropriate message in the label lblQ1_4 (8)

SAMPLE OUTPUT

[30]

3|Page
QUESTION 2 – Strings

A Computer Club wishes to develop an application that would enable users to register. The
following incomplete application has been developed.

Open Quest2_u and complete the event handlers as directed by each question below :

A valid South African ID Number contains 13 digits, where the first 6 digits representing the
date of birth in the format YYMMDD

2.1 Button – Validate ID

Do the following :

• Read in the ID number of the user from the edit edtID and store in a string variable.
• Determine if the ID number is a valid ID number or not. Display a message in a
dialog box, indicating if the ID number is Valid or Not.
• If it is not valid, clear the edit. (5)

SAMPLE OUTPUT

4|Page
2.2 Button Details

Read the details from the edits and display in the rich-edit redQ2, in the following
format :
• Display the Full Name of the user, in uppercase
• Display the Date of Birth of the user in the format DD-MM-YY (6)

SAMPLE OUTPUT

2.3 Button Gender

The seventh digit of the ID number indicates the gender of a person. Study the table
below :
Seventh Digit value between Gender
0-4 Female
5-9 Male
Determine the gender of the user, from the ID number. Display a suitable message in the
rich-edit redQ2, indicating the gender of the user (6)

SAMPLE OUTPUT

2.4 Button Generate UserName

The username will be derived as follows :

• The last three characters of the surname in uppercase


• Followed by the ‘#’ symbol
• Followed by the 7th to the 10th digits of the ID number
• Display the User name in redQ2

SAMPLE OUTPUT

5|Page
(8)

[25]

QUESTION 3 – Loops

Open Quest3_p project from Question 3 folder

Code the following event handlers as directed :

3.1 Button Repeat Word

Read the word from the edit edtWord and store in a variable. Using a looping structure,

display the name 15 times in the rich-edit redQ3 (5)

SAMPLE OUTPUT

6|Page
3.2 Button Odd Numbers

Do the following :

• Read the starting value of the loop from the spin-edit sedStart
• Read the end value of the loop from the spin-edit sedStop
• Run a loop based on this starting value and ending value
• Determine and display all the ODD numbers in this interval in the rich-edit
redQ3 (8)

SAMPLE OUTPUT

3.3 Button Factors

Use variables where necessary to do the following :

• Randomly generate a number in the range 10 to 40


• Display the random number in the rich-edit redQ3
• Determine and display all the factors of the number in the rich-edit redQ3
• Count and display the number of factors the number has
(12)

[25]

GRAND TOTAL = 80
7|Page

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy