You're offline
Skip to content
Question paper

IT P1 QP GR11 NOV 2022 English

Subject: Information TechnologyGrade 11202211 pages
Download

Loading document…

Loading document…

Document textSearch extracted text and jump to a page.
NATIONAL SENIOR CERTIFICATE GRADE 11 NOVEMBER 2022 INFORMATION TECHNOLOGY P1 (EXEMPLAR) MARKS: 150 TIME: 3 hours This question paper consists of 11 pages.
2 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2022) INSTRUCTIONS AND INFORMATION 1. This question paper consists of FOUR questions. Candidates must answer ALL four 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. 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 this 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. Example: Do NOT use locate, sort, filter, recordcount, setlength, charinset, etc 6. Save your work regularly. Ensure that all files can be read. 7. The files that you need to complete this question paper have been given to you. The files are provided in the form of password-protected executable files. Do the following:  Double click on the password-protected executable file.  Click on the extract button.  Enter the following password: 21nOv&11rG. Once extracted, the following list of files will be available in the folder DataNov2021: Question 1: Question 3: Question1_u.pas Question3_u.pas Question1_u.dfm Question3_u.dfm Question1_p.dpr Question3_p.dpr Question1_p.res Question3_p.res dbConnection_u.pas Trees.mdb Question 2: TreesBackUp.mdb Question2_u.pas Question 4: Question2_u.dfm Question2_p.dpr Question4_u.pas Question2_p.res Question4_u.dfm Trees.txt Question4_p.dpr Question4_p.res Copyright reserved Please turn over
(EC/NOVEMBER 2022) INFORMATION TECHNOLOGY P1 3 QUESTION 1: GENERAL PROGRAMMING SKILLS SCENARIO: Complete a program to allow applicants to register and log in to The Tree Society so that they may have access to National and Regional parks for the purpose of environmental education. 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. The program currently has no functionality.  Follow the instructions to complete the code for each Question, 1.1, 1.2, 1.3, 1.4 and 1.5. 1.1 Menu option New Registration Set the panel named pnlRegister to visible. (1) 1.2 Button [btnQ1_2] Register Applicants will enter a start date in the edtDate component. It must be entered in the following format: YYYY/MM/DD. Their contract will be valid for ONE year. Determine the expiry date by increasing the year by one. They will then choose an option from the combobox named cmbAccess to indicate whether they want to have access to National or Regional parks. The annual fee for access to the parks is calculated as follows:  Seniors aged 60 and over: R500  Adults under the age of 60: R400  Students aged 18 to 25: R300  Scholars under 18: R80  Children aged 6 and under: Free Applicants will enter the number of people for each age category in the spin edits provided. Write code to receive the inputs, then calculate and display the total amount due and the expiry date in a message component. NOTE: Regional access will include a deduction of 40 percent from the total amount due. Example of output: (14) Copyright reserved Please turn over
4 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2022) 1.3 Menu option Log In Write code to do the following:  Enable the panel named pnlLogin.  Change the font colour of pnlLogin to green.  Change the colour of pnlLogin to cream.  Clear the input components named edtName and edtPassword.  Set the focus to edtName. (5) 1.4 Button [btnQ1_4] Log In The user will enter their name in edtName and a sentence for a password in edtPassword. Write code to do the following:  Get the input from the input components.  Calculate an encrypted password using the following rules: o The numerical positions of the characters are increased by 3. Example: Each character of the password must be replaced with a character of the alphabet which is three characters to the right of the original character. 'A' becomes 'D', 'B' becomes 'E', etc. o All spaces must be replaced with a star (*). o The letter ‘Z’ must be replaced with the letter ‘A’. o Numbers and other characters stay the same. o The last three characters of the full name must be appended to the end of the encrypted password.  Display the encrypted password in the component named edtEncrypted. (16) Copyright reserved Please turn over
(EC/NOVEMBER 2022) INFORMATION TECHNOLOGY P1 5 Example of output: 1.5 Menu option Log Out Write code to ask the user to confirm that they want to log out and then close the program if they reply yes. Example of output: OR: (4)  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] Copyright reserved Please turn over
6 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2022) QUESTION 2: ARRAYS AND TEXT FILES Do the following:  Compile and execute the program in the Question 2 folder. The program currently has limited functionality.  Enter your full name as a comment in the first line of the Question2_u.pas file.  Complete the code for each question as described in Question 2. 2.1 Button [Q2.1 Read and Display] A text file is provided which contains a list of all protected tree species and the quantities that have been found in the country. The format of the text file is as follows: <tree name>#< quantity found> In certain rows in the text file the tree name is not enclosed in quotation marks. Most of the tree names are enclosed in quotation marks. Example of data in the text file Trees.txt: Two global arrays and an array counter have been provided as described below: arrqty: array[1..200] of integer; arrtrees: array[1..200] of string; icountarr: integer; Write code to do the following:  Connect to the text file and read each line into the global arrays provided, separating the tree name and the quantity into each array. Make sure to remove the quotation marks from the tree name, if there are any.  Calculate and display the total number of species in the edit box named edtprotected.  Calculate the total number of trees found.  Sort both arrays according to the quantities from lowest to highest quantity.  Display, in redOut, the contents of the sorted arrays in neat columns and then display the total number of trees found. Copyright reserved Please turn over
(EC/NOVEMBER 2022) INFORMATION TECHNOLOGY P1 7 Example of output: (32) 2.2 Button [Q2.2 Endangered list] Species which have had less than 100 trees found, must be put on the endangered list. Write code to do the following:  Create a text file named ‘Endangered.txt’.  Use the two global arrays to find the names of all tree species where the quantity found is less than 100.  Display the name of the endangered tree in the richedit named redOut.  Write the name of the endangered tree to the text file ‘Endangered.txt’. Example of output to the text file and the richedit: (8)  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] Copyright reserved Please turn over
8 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2022) QUESTION 3: DATABASE PROGRAMMING This question consists of sub-questions 3.1 to 3.5. The following important notes are applicable to all questions:  You are NOT allowed to modify or add to the supplied data or supplied programming code.  Good programming techniques from first principles only must be applied.  NO marks will be assigned for hardcoding. Use control structures and variables where necessary  Do NOT use filter, sort, locate, recordcount, etc. There are many tree species found in South Africa. A database has been designed to store details of some of these tree species and are recorded in one table. A table named TreeName has been supplied in the database named Trees.mdb. A sample of records in this table is displayed below: The design view of the table named TreeName which includes the field data types, is displayed below: NOTE:  Connection code has been provided.  When the Restore Database button is clicked, the data in the database will be restored to the original data.  The name of the table to be used in your code must be tblTrees, which is the TADOTable object connected to the database. Copyright reserved Please turn over
(EC/NOVEMBER 2022) INFORMATION TECHNOLOGY P1 9 Do the following:  Compile and execute the program in the Question 3 folder. The program currently has limited functionality.  Enter your full name as a comment in the first line of the Question3_u.pas file.  Complete the code for each question as described in Question 3. 3.1 Button [Q3.1 Western Cape] Display the ScientificName of all trees which can be purchased in the Western Cape Area. Display the results in the richedit named redDisplay. Example of output: (6) 3.2 Button [Q3.2 Iconic and Protected] Display the OtherName of all trees that are Iconic and where the Description is ‘Protected’. Display the results in the richedit named redDisplay. Example of output: (8) 3.3 Button [Q3.3 Delete Invasive Trees] Write code to delete all trees which have the Description of ‘invasive’. Example of output: (7) Copyright reserved Please turn over
10 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2022) 3.4 Button [Q3.4 Red Favourites] Change the Favourite field to True for all trees that have the OtherName starting with the word ‘Red’. Example of output: (9) 3.5 Button [Q3.5 Indigenous Average] Write code to calculate and display the average number of all Indigenous trees that have been Counted. The average must be rounded to no decimal places. Display the result in the richedit named redDisplay. Example of output: (10)  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] Copyright reserved Please turn over
(EC/NOVEMBER 2022) INFORMATION TECHNOLOGY P1 11 QUESTION 4: GENERAL PROBLEM SOLVING Do the following:  Compile and execute the program in the Question 4 folder. The program currently has limited functionality.  Enter your full name as a comment in the first line of the Question4_u.pas file.  Complete the code for each question as described in Question 4. 4.1 Button [Question 4.1] A number is a perfect number if its factors (excluding the number itself) adds up to the number. Example: The factors of 6 are: 1 2 3 6. 1 + 2 + 3 = 6. Therefore 6 is a perfect number. Write code to generate a random number from 1000 to 9999, both included, and then calculate and display all perfect numbers in the range from 1 to that random number. Display the random number and perfect numbers in the memDisplay component. Example of output: (12) 4.2 Button [Question 4.2] The hexadecimal number system has 16 digits: 0 – 9, A – F. The hexadecimal numbers A – F represent the decimal numbers 10 – 15 respectively. Write code to read in a decimal number that is entered into the component named edtDecimal and convert the number to hexadecimal. Display the hexadecimal number in the component named edtHexadecimal. If no number is entered, a suitable message must be displayed and the program must be closed. Example of output: (18)  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

Published documents with matching subject and grade metadata.

Matched using subject, grade, language, document type and exam metadata.

More from Grade 11 Information Technology

Explore more published documents in this catalogue.

View all