0% found this document useful (0 votes)
11 views11 pages

Grade 10 IT Exam Paper November 2022

This document outlines the instructions for a Grade 10 Information Technology examination scheduled for November 2022, consisting of various programming tasks across multiple tab sheets. Students are required to complete coding assignments based on provided specifications, including GUI modifications, calculations, and data handling. The examination is structured to assess programming skills and understanding of concepts related to software development and data manipulation.
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)
11 views11 pages

Grade 10 IT Exam Paper November 2022

This document outlines the instructions for a Grade 10 Information Technology examination scheduled for November 2022, consisting of various programming tasks across multiple tab sheets. Students are required to complete coding assignments based on provided specifications, including GUI modifications, calculations, and data handling. The examination is structured to assess programming skills and understanding of concepts related to software development and data manipulation.
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

HIGH SCHOOL

Examiner:
Moderator:

November 2022

Examination

Grade 10

Information Technology P 1

Marks: 120
Time: 2 ½ hours

This paper consists of 11 pages.


Information Technology/P1 2 November 2022

INSTRUCTIONS AND INFORMATION

1. This is a two-and-a-half-hour examination. Because of the nature of this


examination it is important to note that you will not be permitted to leave the
examination room before the end of the examination session.

2. Answer ALL the questions.

3. You require the files listed below to answer the questions. They are on the
network folder linked to your examination username:

frmQuestion1_P.dpr
frmQuestion1_U.dfm
frmQuestion1_U.pas
frmQuestion1_P.res
[Link]

4. Save your work at regular intervals as a precaution against power failures.

5. Rename the folder 10ITNovemberSurnameName with your own.


For example: 10ITNovemberSmithJohn

6. Type your name, surname and today's date as a comment in the first lines of the
program.

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

8. 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 the data validation.

9. 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.

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

11. After the examination you will be given time to print your unit to submit.

Copyright reserved Please turn over


Information Technology/P1 3 November 2022

Do the following:
• Open the incomplete program in the folder 10ITNovemberSurnameName.
• Enter your name and surname as a comment in the first line of the
frmQuestion1_U.pas file.
• Compile and execute the program. The user interface displays EIGHT tab
sheets.
• Follow the instructions below to complete the code as described in QUESTION 1
to QUESTION 8.

Example of the graphical user interface (GUI):

Copyright reserved Please turn over


Information Technology/P1 4 November 2022

1. Tab sheet [Home]:


Button [Welcome]

Write code to do the following:


• Change the Image imgPic as follows:
o Load the picture named [Link] to display in the image.
o Set the stretch property to true.
o Set the width of the image to 241.
o Set the left property of the image to 300.

• Change the Label lblWelcome as follows:


o Display the heading 'Life Long Learning'.
o Change the font colour to green (clGreen).
o Change the font to 'Elephant'.
o Format the text to display in bold.

Example of output:

(14)

Copyright reserved Please turn over


Information Technology/P1 5 November 2022

2. Tab sheet [Random]:


Button [Random Numbers]

The program needs to generate two random real values and display the highest
and lowest numbers in the appropriate edits provided.

Write code to do the following:


• Generate two random real numbers between 1 and a number less than 100.
Store the numbers in variables named rHighest and rLowest.
• Round the numbers off to two decimal places.
• If the higher number is stored in rLowest, swap the contents of the two
variables.
• Display rHighest in edtHighest and rLowest in edtLowest.

Example of output:

(11)

NOTE: Due to random numbers being generated your output may differ.

3. Tab sheet [Game Cost]:


3.1. Button [Determine Cost]

Educational games are expensive but when customers buy games in bulk they
can qualify for a discount.

Write code to do the following:


• Declare a constant variable named CostPerGame for the cost of one game
and set the constant to R 59.99.
• Declare appropriate variables to store input from the customer for the
number of games they would like to purchase and the cost to be calculated
as described below.
• Store input from a customer, as entered in the spin edit, for the number of
games they would like to purchase.
• Determine the cost of the games as follows:
o For every 10 games purchased they get one game for free.
o Use the constant variable, holding the cost per game, to determine the
cost for this customer’s games.
• Add 15% VAT to the cost.
• Display the cost including the VAT in edtCost.

Copyright reserved Please turn over


Information Technology/P1 6 November 2022

• Count the number of customers who have purchased games so far.


• Display the customer number and the number of games purchased in neat
columns in redSummary. Add code to the appropriate event to ensure
that the headings display only once.
• Keep track of the total income the company receives.
• Determine the highest amount spent by a customer. This value will be
displayed in the Summary button.
• Enable the button btnSummary.

Example of output when 5, 20 and 18 games were entered:

(26)

3.2. Button [Summary]

A summary of the income from all the customers is needed.

Write code to calculate the following and display in the rich edit:
• Display the total income.
• Calculate and display the average amount the company received per
customer.
• Display the highest amount spent by a customer.

Example of output:

(5)

Copyright reserved Please turn over


Information Technology/P1 7 November 2022

4. Tab sheet [Volume]:


Button [Calculate Volume]

A mathematical game needs to determine the volume of a model house


consisting of a triangular prism as the roof and a rectangular prism as the base.

Declarations of the variables needed have been provided. Code has also been
provided to assign a value of 6 to the height of the house in the variable
iHouseHeight.

Write code to do the following:


• Make use of dialog boxes to store input from the user for the length and
width of the model house and the height of just the roof.
• Determine the volume of the roof and the entire house making use of the
following formulas:
o Volume of triangular prism (Roof):
1 / 2 X Roof Height X Width X Length
o Volume of rectangular prism (Base of house):
Length X Width X House Height
• Calculate and display the percentage that the volume of the roof is of the
total house volume.
• Display the volume of the house and the roof percentage, both formatted to
ONE decimal place in the rich edit redVolume.

Example of output when 3 was entered as the height of the roof and 7 and 9
were entered for the width and length of the house respectively.

(13)

Copyright reserved Please turn over


Information Technology/P1 8 November 2022

5. Tab sheet [Acronym]:


Button [Create Acronym]

A program is needed to create acronyms for the terminology found in the


BrainbIT Grade 10 IT theory textbook. An acronym is an abbreviation formed by
using the first letter of every word in a term.

Write code to do the following:


• Test whether the user selected an option from the radio group. If they did
not, display an appropriate message and prevent the rest of the code from
executing.
• Store input from the user for the term selected in the radio group.
• Make use of a loop to create an acronym by extracting the first letter of
every word in the term. Ensure that the acronym created is capitalised.
• Display the term and its acronym in a dialog box over two lines.

Examples of output:

(15)

Copyright reserved Please turn over


Information Technology/P1 9 November 2022

6. Tab Sheet [Expiry Date]:


6.1. Button [Display Expiry Date]

Shareware often allows users to use software for a certain number of days for
free. The expiry date of this software needs to be determined for the user.

Write code to do the following:


• Store the input from the user from the date time picker for when the
software was activated.
• Determine the expiry date as follows:
o If the user did not select the extended option in the checkbox
chkExtended the expiry date is 60 days from the date of activation.
o If they selected the extended option, the expiry date is 90 days from the
date of activation.
• Display the date of expiry in the same format as in the examples of output in
the rich edit redExpiry.
• Determine and display the day of the week on which the software will
expire.

Examples of input and output:

(10)

6.2. Button [Retry]

Write code to do the following:


• Reset the date time picker to today's date.
• Clear the checkbox and the rich edit.
• Set the focus to the date time picker. (4)

Copyright reserved Please turn over


Information Technology/P1 10 November 2022

7. Tab sheet [Harshad]:


Button [Harshad Number]

A Harshad number is an integer that is divisible by the sum of its digits.

For example, 195 is a Harshad number:


1 + 9 + 5 = 15
195 is divisible by 15 with no remainder.

A program is needed to determine whether a number is a Harshad number.

Write code to do the following:


• Store input from the user for a number of any length.
• Calculate the sum of all the digits in the number.
• Determine if the number is divisible by the sum of its digits without a
remainder. If it is, it is a Harshad number.
• Display a suitable message in the label lblHarshad indicating whether it is a
Harshad number or not.

Examples of output

(11)

8. Tab sheet [Hexadecimal]:


Button [Calculate Hexadecimal]
Decimal numbers can be converted to hexadecimal numbers by repeatedly
dividing the number by 16 until the result is 0 and writing the remainders in
reverse order. The numbers 10 to 15 are represented by the letters A to F.
Code to store the letters A to F in a variable sLetters has been provided:
sLetters := 'ABCDEF';

Copyright reserved Please turn over


Write code to do the following:
• Store the decimal number entered by the user in sedDecimal.
• Initialise the output string sHexa.
• Convert the decimal number to its corresponding hexadecimal number using
the following algorithm:

While the decimal number is greater than zero continue to do the following:

o Determine and store the remainder when the decimal number is divided
by 16.
o If the remainder is a number from 10 to 15 do the following:
▪ Deduct nine from this number.
▪ Add the character from the provided variable sLetters, in the
position determined by the calculation above, to the left of the
output string.
For Example: If the remainder was 10, 10 – 9 = 1, therefore the
letter in position 1 i.e. 'A' will be added to the left of the output
string.
o If the remainder is a number from 0 to 9, add the remainder to the left
of the output string.
o Divide the decimal number by 16 and store this answer in the decimal
number variable, overwriting its original value.
• Display the output string in edtHexa.

Examples of input and output:

(11)

• Enter your Name and Surname as a comment in the first line of the program file
frmQuestion1_U.
• Save all the files ('File/Save All').
• Printouts of the code for the unit (frmQuestion1_U) will be required.

TOTAL: 120

Copyright reserved Last page

You might also like