You're offline
Skip to content
Question paper

IT P1 QP GR11 NOV2020 English D

Subject: Information TechnologyGrade 11202016 pages
Download

Loading document…

Loading document…

Document textSearch extracted text and jump to a page.
NATIONAL SENIOR CERTIFICATE GRADE 11 NOVEMBER 2020 INFORMATION TECHNOLOGY P1 MARKS: 150 TIME: 3 hours *IINFTE1* This question paper consists of 15 pages.
2 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2020) 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. 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: x Double click on the password-protected executable file. x Click on the ‘Extract’ button. x Enter the following password: Nov20C#4d Once extracted, the following list of files will be available in the folder DataNov2020: 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 SAFlag.txt dbConnection_u.pas CovidResearch.mdb CovidResearchBackUp.mdb Question 2: Question 4: Question2_u.pas Question4_u.pas Question2_u.dfm Question4_u.dfm Question2_p.dpr Question4_p.dpr Question2_p.res Question4_p.res numbers.txt Copyright reserved Please turn over
(EC/NOVEMBER 2020) INFORMATION TECHNOLOGY P1 3 QUESTION 1: GENERAL PROGRAMMING SKILLS SCENARIO: Complete a program to create codes for patients when they are admitted to a hospital and display the total number of patients admitted to hospitals in the Eastern Cape and the Western Cape. Do the following: x Open the incomplete program in the Question 1 folder. x Enter your full name as a comment in the first line of the Question1_u.pas file. x Compile and execute the program. The program currently has no functionality. x Follow the instructions to complete the code for each Question 1.1, 1.2 and 1.3. 1.1 Button [Q1.1 Get Patient Code] on Question 1.1 tabsheet Patients will enter their first name and surname into the edit box named edtfullname, choose a province (either Eastern Cape or Western Cape) from the combobox named cmbprovince and type in their year of birth (in the format ‘YYYY’) into the edit box named edtyear. Write code to do the following: x An error message must be displayed and the procedure must exit if a patient did not choose a province. Example of output: x Every time the Get Patient Code button is clicked, the number of patients for the selected province must be increased by one. The total number of patients for each province must be displayed on the panels named pnlEC and pnlWC. Copyright reserved Please turn over
4 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2020) Example of output: x The patient code must be compiled and displayed in a message component using the following algorithm: The 1st character of the first name and the 1st character of the surname must be joined to the 3rd and 4th characters of the year of birth and the first four characters of the province. A random number from 1000 to 60 000 (both included) must be added to the end of the code. Example: Vuyelwa Mcuba was born in 2001 and has been admitted to a hospital in the Eastern Cape. She will have a patient code of VM01East26099. (The random number is 26099). Example of output: (26) Copyright reserved Please turn over
(EC/NOVEMBER 2020) INFORMATION TECHNOLOGY P1 5 1.2 Button [Q1.2 Encryption] on Question 1.2 tabsheet The user will enter a sentence in the edit box named edtinput which must then be encrypted and displayed in a label named lbldisplay. Write code to do the following: x The input from the edit component named edtinput must be converted to all capital letters and then the sentence must be encrypted and displayed in the label named lbldisplay using the following cypher: x A space is represented as the number 1. x The characters from A to Z are represented as numbers from 2 to 27. x All symbols and numbers in the original sentence are represented as the number 0. x A star (*) must be added to the beginning and end of the encrypted string. x Every number of the encrypted string must be separated by a star (*). Example of output if ‘Do IT’ is entered: Example of output if ‘Do IT 2#’ is entered: (13) Copyright reserved Please turn over
6 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2020) 1.3 The rgppicture onclick event: The user will choose an option from the radio group named rgppicture. Write code to do the following: If the user clicks on the radio button for ‘No background’, then the picture of the image component named imgdisplay must be set to invisible. If the user clicks on the ‘South African Flag’ radio button, then the picture named SAFlag.jpg must be displayed as the background and the picture in the image component must be set to visible. Example of output: (7) x Enter your name and surname as a comment in the first line of the program file. x Save your program. x A printout of the code may be required. [46] Copyright reserved Please turn over
(EC/NOVEMBER 2020) INFORMATION TECHNOLOGY P1 7 QUESTION 2: ARRAYS AND TEXT FILES Do the following: x Compile and execute the program in the Question 2 folder. The program currently has limited functionality. x Enter your full name as a comment in the first line of the Question2_u.pas file. x Complete the code for each question as described in Question 2. 2.1 Button [Q2.1 Display] A global array named arrqty has been declared which contains 10 integers. The numbers in this array represent the total number of positive cases of the first 10 days of April. Another global array named arrdays has been declared which contains strings representing the first 10 days of April and this array is parallel to arrqty. Below is a diagrammatical representation of the array named arrqty: 1 2 3 4 5 6 7 8 9 10 1505 1934 1380 2003 1686 1655 1845 1462 1749 1585 Below is a diagrammatical representation of the array named arrdays: 1 2 3 4 5 6 7 8 9 10 1 10 7 3 April 9 April 6 April 5 April 8 April 2 April 4 April April April April Write code to do the following: x Sort the array named arrqty (as well as the array named arrdays) in descending order from the highest value to the lowest value of the array named arrqty. x Display the contents of the two global arrays in the richedit named redout using neat spacing. (Code has been provided for headings and a tab stop.) x Calculate and display the average of all infections in the richedit, rounded to a whole number. Copyright reserved Please turn over
8 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2020) Example of output: (21) 2.2 Button [Q2.2 Multiples] You are provided with the text file named numbers.txt which contains FIVE lines representing the following data: You are also provided with a constant array named arradd. CONST arradd : array [1..5] of integer = (8,6,4,2,0); You are going to calculate the multiples of 18 by using the diagram below: Numbers from the text file: 1 3 5 7 9 Numbers to append: 8 6 4 2 0 Multiples of 18: 18 36 54 72 90 Do the following: x Write code to display a message and exit the procedure if the text file does not exist. x Read the lines from the text file into an array and append the numbers 8,6,4,2 and 0 using the constant array named arradd to each of the corresponding numbers 1,3,5,7 and 9 from the text file, as shown in the diagram above, using a looping structure. x Create a text file named ‘Multiples of 18.txt’. x Write to this text file, the five multiples of 18 (18,36,54,72,90) which you compiled using the method above. Use a looping structure. x Display a message indicating that the file was successfully written. Copyright reserved Please turn over
(EC/NOVEMBER 2020) INFORMATION TECHNOLOGY P1 9 NOTE: If you do not use a loop, you will lose marks. Example of output to the text file: (21) x Enter your name and surname as a comment in the first line of the program file. x Save your program. x A printout of the code may be required. [42] Copyright reserved Please turn over
10 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2020) QUESTION 3: DATABASE MANIPULATION This question consists of sub-questions 3.1 to 3.5. The following important notes are applicable to all questions: x You are NOT allowed to modify or add to the supplied data or supplied programming code. x Good programming techniques from first principles only must be applied. x NO marks will be assigned for hardcoding. Use control structures and variables where necessary x Do NOT use filter, sort, locate, recordcount, etc. There are thousands of research articles based on the ‘Covid-19’ disease. A database has been designed to store details of a few of these research papers and they are recorded in one table. A table named Articles has been supplied in the database named CovidResearch.mdb. A sample of records in this table is displayed below: The design view of the table named Articles, which includes the field data types, is displayed below: NOTE: x Connection code to connect the database has been provided. x When the Restore Database button is clicked, the data in the database will be restored to the original data. x The name of the table to be used in your code, is tblResearch. Copyright reserved Please turn over
(EC/NOVEMBER 2020) INFORMATION TECHNOLOGY P1 11 Do the following: x Compile and execute the program in the Question 3 folder. The program currently has limited functionality. x Enter your full name as a comment in the first line of the Question3_u.pas file. x Complete the code for each question as described in Question 3. 3.1 Button [Q3.1 Display Pages] Display the Title of all articles which contain more than 100 Pages. Display the results in the richedit named reddisplay. Example of output: (7) 3.2 Button [Q3.2 Change to English] There exists more than one article which was written in English but the Language has been saved as ‘eng’ in the table. This was a result of errors when data entry occurred. You must write code to change the Language of those articles from ‘eng’ to ‘English’. Example of output of the first few records: (7) Copyright reserved Please turn over
12 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2020) 3.3 Button [Q3.3 Delete PMC articles] Write code to delete all articles with the Source field named ‘PMC’. Example of output: (6) 3.4 Button [Q3.4 Percentage of Chinese articles] Write code to calculate and display the percentage of Chinese articles that exist in the table. Display the total number of articles in the table as well as the percentage of Chinese articles in the richedit named reddisplay. Display the percentage of Chinese articles rounded to a whole number. Example of the display in redDisplay (after PMC articles are deleted (Q3.3)): Total number of articles = 13 Percentage of Chinese articles = 23 percent (13) Copyright reserved Please turn over
(EC/NOVEMBER 2020) INFORMATION TECHNOLOGY P1 13 3.5 Button [Q3.5 Add Article] Add a new article with the title, ‘Vaccine trials’. This article consists of 43 pages and was written in English by the author ‘Watson M’ and published by ‘Cureus’. Example of output: (7) x Enter your name and surname as a comment in the first line of the program file. x Save your program. x A printout of the code may be required. [40] Copyright reserved Please turn over
14 INFORMATION TECHNOLOGY P1 (EC/NOVEMBER 2020) QUESTION 4: GENERAL PROBLEM SOLVING Do the following: x Compile and execute the program in the Question 4 folder. The program currently has limited functionality. x Enter your full name as a comment in the first line of the Question4_u.pas file. x Complete the code for each question as described in Question 4. Button [Q4 Request for Test] Write code to do the following: x Get the name and the age of a patient from the input components named edtname and sedage. x If the age of the person is greater than or equal to 60, then a string variable must consist of the following: ‘Your test is on ’ joined to the system date. Example of the compiled string if today’s date is 6 November 2020: ‘Your test is on 2020/11/06’ x If the age of the person is less than 60, then the string must be set to the following: ‘Your test is on ’ joined to the system date + 1 day. Example of the compiled string if today’s date is 6 November 2020: ‘Your test is on 2020/11/07’ x If the check box named chksymptoms is checked AND one of either chktravel or chkcontact is checked, then display the patient’s name and the date to be tested on two separate lines on the label named lbldisplay, else display the message ‘Phone your doctor if you are worried’ on the label named lbldisplay. Copyright reserved Please turn over
(EC/NOVEMBER 2020) INFORMATION TECHNOLOGY P1 15 Example of output for Question 4 if today’s date is 27 June 2020 and if the different checkboxes are selected: x Enter your name and surname as a comment in the first line of the program file. x Save your program. x A printout of the code may be required. [22] 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
IT P1 QP GR11 NOV2020 English D | Hlayiso