IT P1 GR12 QP SEPT 2024 - English - Watermark
IT P1 GR12 QP SEPT 2024 - English - Watermark
SENIOR CERTIFICATE
GRADE 12
SEPTEMBER 2024
INFORMATION TECHNOLOGY P1
MARKS: 150
TIME: 3 hours
Hosted by www.ecexams.co.za.
2 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
1. This question paper is divided into FOUR questions. Candidates must answer
ALL the questions.
2. The duration of this examination is three hours. 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.
3. This question paper is set with programming terms that are specific to Delphi
programming language.
4. 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.
5. 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.
6. 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.
7. 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.
8. All data structures must be defined by you, the programmer, unless the data
structures are supplied.
9. 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.
10. Make sure that your name appears as a comment in every program that you
code, as well as on every event indicated.
11. If required, print the programming code of all the programs/classes that you
completed. You will be given half an hour printing time after the examination
session.
12. At the end of this examination session, you must hand in a disk/CD/DVD/ flash
disk with all your work saved on it OR you must make sure that all your work
has been saved on the disk space allocated to you for this examination session.
Make sure that all files can be read.
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 3
14. The files that you need to complete this question paper have been provided
to you on the disk/CD/DVD/flash disk or on the disk space allocated to you.
The files are provided in the form of password-protected executable files.
Do the following:
Once extracted, the following list of files will be available in the folder
DataENGAug2024:
Question 1: Question 3:
Question1_P.dpr Crypto_U.pas
Question1_P.dproj Question3_P.dpr
Question1_P_Icon.ico Question3_P.dproj
Question1_U.dfm Question3_P_Icon.ico
Question1_U.pas Question3_U.dfm
Question3_U.pas
Question 2: Question 4:
CryptoExchange.mdb Crypto.txt
CryptoExchangeBackUp.mdb Question4_P.dpr
dbConnection_u.pas Question4_P.dproj
Question2_P.dpr Question4_P_Icon.ico
Question2_P.dproj Question4_U.dfm
Question2_P_Icon.ico Question4_U.pas
Question2_U.dfm
Question2_U.pas
Hosted by www.ecexams.co.za.
4 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
SCENARIO
Cryptocurrencies have once again surged in popularity. Given the rapid advancement in
existing and emerging cryptocurrency technologies, grasping the fundamentals, security
protocols, and practical applications is imperative. Your task is to devise programming
solutions for the following questions pertaining to cryptocurrencies.
Do the following:
• Open the incomplete program in the Question 1 folder.
• Enter your full name as a comment in the first line of the Question1_U.pas file.
• Compile and execute the program. Currently the program has no functionality.
Complete the code for each section of QUESTION 1, as described in QUESTION 1.1
to QUESTION 1.4 that follow.
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 5
Example of output:
(6)
Code the button btn1_2 to calculate how many coins each friend will receive,
and how many coins will remain after sharing takes place. Output in the label
lbl1_2 as per example screenshots. Ensure the correct use of apostrophes and
enter spaces.
Output if 56 coins were purchased. Output if 12 coins were purchased.
(10)
Hosted by www.ecexams.co.za.
6 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
Crypto accounts require strong passwords. You are thus required to write an
algorithm that will generate a strong password.
Code the button btn1_3 to generate a password based on the following rules.
Example of output (NOTE: each output will differ due to the random counts of
each character).
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 7
Some of the MEME coins would like their branding to involve ASCII Art (art made
from characters).
Code the button btn1_4 to generate a pattern based on the following rules:
1. Prompt the user to input the length of the longest line for the pattern.
2. Construct the pattern using the character ‘&’.
3. Begin with a single ‘&’ character on the first line.
4. For each subsequent line, add one ‘&’ character to the end of the previous
line.
5. After reaching the maximum number of characters, begin removing ‘&’
characters from the beginning of each line until only one ‘&’ character remains
on the last line.
6. Display the generated pattern in the rich edit redOutput.
Example output:
(7)
• Enter your name and surname as a comment in the first line of the program
file.
• Save your program.
• A printout of the code may be required.
[35]
Hosted by www.ecexams.co.za.
8 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
An application is required that will use the CryptoExchange.mdb database to manage the
data and queries of cryptocurrency traders.
The data pages attached at the end of the question paper provide information on the design
of the CryptoExchange.mdb database and its contents.
Do the following:
• Follow the instructions below to complete the code for each section as described in
QUESTION 2.1 and QUESTION 2.2.
• Use SQL statements to answer QUESTION 2.1 and Delphi code to answer
QUESTION 2.2.
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 9
NOTE:
• The ‘Restore database’ button is provided to restore the data contained in the database
to the original content.
• The content of the database is password-protected, i.e. you will NOT be able to gain
access to the content of the database using Microsoft Access.
• Code is provided to link the GUI components to the database. Do NOT change any of
the code provided.
• THREE variables are declared as public variables, as described in the table below:
NOTE:
• Use ONLY SQL code to answer QUESTION 2.1.1 to QUESTION 2.1.6.
• Code to execute the SQL statements and display the results of the queries is
provided. The SQL statements that will be assigned to the variables sSQL1,
sSQL2, sSQL3, sSQL4, sSQL5, and sSQL6 are incomplete.
Complete the SQL statements to perform the tasks described in QUESTION 2.1.1 to
QUESTION 2.1.6 below.
Hosted by www.ecexams.co.za.
10 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
Write SQL code to display all the fields of all the members, sorted by the
age of the member from youngest to oldest.
(3)
Write SQL code to display the various types of Crypto available as well as
the total amount of Crypto in each type.
Example of output:
(4)
The user would like to know how many members celebrate their birthday in
a certain month. Code has been provided to allow the user to fill in the
month using an input box.
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 11
Write SQL code to display the number of birthdays that will be celebrated in
the month chosen in the input box. Name the calculated field “Birthdays in
[the correct month]”. You may make use of the provided constant array:
ARRMONTHS.
Example of output:
Input = 1 Input = 6
Input = 10
(6)
You would like to see all the members who have Litecoin with the value of
over R5 500. A variable with Litecoin’s exchange value has been declared
and assigned for you.
Example of output:
(9)
(3)
Hosted by www.ecexams.co.za.
12 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
(3)
NOTE:
• Use ONLY Delphi programming code to answer QUESTION 2.2.1 and
QUESTION 2.2.2.
• NO marks will be awarded for SQL statements in QUESTION 2.2.
• Use the global variables, tblMembers and tblCrypto, provided.
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 13
Write code to search in the loop if a member exists. If they exist, output to the
rich edit redOutput as per example screenshot (Name, Surname, E-Mail,
Gender).
Example of output:
If “Lightwood” was entered in the search. If “Soap” was entered in the search.
(5)
Code has been provided to you to display the heading Total Members = 50.
Write code to loop through the Members table and tally the various genders.
Output to the rich edit redOutput as per example screenshots. Add a test to
determine if your total gender count is the same or different to the original.
You may make use of standard variables or arrays to solve this question.
Example of output:
(12)
• Enter your name and surname as a comment in the first line of the program file.
• Save your program.
• A printout of the code may be required.
[45]
Hosted by www.ecexams.co.za.
14 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
Traders can create a Crypto account and select one of three different
Cryptocurrencies: Bitcoin, Ethereum or Litecoin. Once they have created their
account, they can purchase their chosen crypto asset by entering a Rand value they
are willing to spend. The program will determine the correct amount of the crypto asset
based on the exchange rate of the cryptocurrency. Since Cryptocurrencies fluctuate
so much, traders can view the current value of their crypto asset in the “Live” viewer.
The program updates every second and will display whether the trader has made a
Profit or a Loss based on their original purchase value.
Do the following:
Complete the code as specified in QUESTION 3.1 and QUESTION 3.2 that follow.
*****NOTE: You are NOT allowed to add any additional attributes or user-defined
methods, unless explicitly stated in the question.*****
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 15
3.1 The provided incomplete class (TCrypto) contains the declaration of six attributes that
describe the objCrypto object.
Name of
Description
attributes
fFirstName String value containing trader’s first name
fSurname String value containing trader’s surname
fCrypto Integer value containing which Cryptocurrency the trader selected
fAmount Real value containing the Cryptocurrency amount
fOriginalValue Real value containing the money originally spent by the trader
fCurrentValue Real value containing the current value in Rands of the trader’s
Cryptocurrency
3.1.1 Write code for a constructor method named Create that will receive the
following parameters:
• First name
• Surname
• Cryptocurrency (value ranging between 0 and 2)
Assign these parameter values to the correct attributes and set the remaining
attributes to a default value of 0. (5)
3.1.2 Write an accessor method called getCryptoName that returns the full name
of the cryptocurrency based on the fCrypto field attribute. The mapping is as
follows:
• 0 = Bitcoin
• 1 = Ethereum
• 2 = Litecoin
Uncomment the code in the toString method. (4)
Hosted by www.ecexams.co.za.
16 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
3.1.3 Write code for a mutator method called setAmount that receives a value
(purchase value of cryptocurrency) as a parameter.
Set the fAmount attribute based on the following rules by multiplying the
purchase value (received by the main unit) with the exchange rate:
Set the fOriginalValue attribute to the purchase value received from the
main unit. This value must be able to update as more cryptocurrency of the
same type is purchased. (7)
3.1.4 Write code for a mutator method called setValue. This method will set the
fCurrentValue parameter to the current exchange of the cryptocurrency
(fAmount * exchange rate). Since cryptocurrencies are so volatile and
constantly fluctuate, the conversion rates will be based on random values
between certain ranges.
3.1.5 Write a method called calcProfitLoss that will return a string value of a
‘Profit’, ‘Loss’ or ‘Even’.
The method will make use of the object’s attributes to determine the output.
• If the current value is greater than the original price, then it is a profit.
• If the current value is less than the original price, then it is a loss.
• If the current value is equal to the original price, then it is even. (6)
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 17
The crypto trader will enter their desired purchase price into the edit box.
When the Live button is pressed, the program will update every second and
display the current value of the cryptocurrency along with whether the trader
has made a profit or a loss compared to their original purchase value.
Example of output if Joe Soap bought R50 000 of Ethereum: Rand values
will be random.
Profit Loss
Hosted by www.ecexams.co.za.
18 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
Profit Loss
(5)
• Enter your name and surname as a comment in the first line of the program
file.
• Save your program.
• A printout of the code may be required.
[40]
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 19
The cryptocurrency market consists of trillions of rands worth of money. This application
has been created to view 20 popular cryptocurrencies, along with their market capitalisation
in USD and currency value in ZAR (South African Rand).
Do the following:
Hosted by www.ecexams.co.za.
20 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
• This array will be used to store the data from the text file about the 20 different
cryptocurrencies.
Complete the code for each section of QUESTION 4, as described in QUESTION 4.1
to QUESTION 4.4 below.
The data from the text file Crypto.txt needs to be read into the two-dimensional
array ar2Crypto. Each row of the array should represent a cryptocurrency and
each column should hold the respective data field (Name, Symbol,
CurrentPriceInZAR, MarketCapInUSD).
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 21
Example of output:
(5)
Hosted by www.ecexams.co.za.
22 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
(10)
(3)
• Enter your name and surname as a comment in the first line of the program
file.
• Save your program.
• A printout of the code may be required.
[30]
TOTAL: 150
Copyright reserved Please turn over
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 23
INFORMATION TECHNOLOGY P1
The following one-to-many relationship with referential integrity exists between the two
tables in the database:
Table: tblMembers – This table contains details of the crypto trader members.
Hosted by www.ecexams.co.za.
24 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2024)
Hosted by www.ecexams.co.za.
(EC/SEPTEMBER 2024) INFORMATION TECHNOLOGY P1 25
Hosted by www.ecexams.co.za.