Skip to content

Information Technology Grade 12 P1 Eastern Cape Mock 2023 QP

Question paperInformation TechnologyGrade 12202324 pages

Grade 12 Information Technology Paper 1 question paper from the Eastern Cape Mock Exam 2023 (English), 24 pages. Read online or download the free PDF.

Free to read online, no sign-up needed

Answer online

Loading document…

Loading document…

Questions in this paper

Document textSearch extracted text and jump to a page.
NATIONAL SENIOR CERTIFICATE GRADE 12 SEPTEMBER 2023 INFORMATION TECHNOLOGY P1 MARKS: 150 TIME: 3 hours This question paper consists of 24 pages.
2 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) INSTRUCTIONS AND INFORMATION 1. This question paper is divided into FOUR sections. 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. 13. Save your work regularly. Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 3 14. The files that you need to complete this question paper have been given 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: • Double click on the password-protected executable file. • Click on the extract button. • Enter the following password: eMSm&tMR@23 Once extracted, the following list of files will be available in the folder DataSept2023: Question 1: Question1_p.dpr Question1_p.res Question1_u.dfm Question1_u.pas Question 2: FlightInfo.mdb FlightInfoBackUp.mdb dbConnection_u.pas Question2_p.dpr Question2_p.res Question2_u.dfm Question2_u.pas Question 3: Folder: Images\Flags – (7 Flag Images) Folder: Images\Aircraft – (17 Aircraft Images) Aircraft_List.csv Question3_p.dpr Question3_p.res Question3_u.dfm Question3_u.pas Question3ClassDefinition.pas Question 4: Folder: Destination Textfiles – (5 text files) Airplane.png Question4_p.dpr Question4_p.res Question4_u.dfm Question4_u.pas Copyright reserved Please turn over
4 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) QUESTION 1: GENERAL PROGRAMMING SKILLS SCENARIO: You would like to become a pilot; therefore, you need to start researching how to become a pilot and which aircraft license type you should obtain. You decide to code an application that will assist you in your research as well as studies towards your pilot license. 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. • Follow the instructions below to complete the code for each section of QUESTION 1, as described in QUESTION 1.1, QUESTION 1.2 and QUESTION 1.3. An example of the GUI is given below: Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 5 1.1 Button [Q1.1 – Determine cost] Firstly, you need to determine which aircraft license type you can afford. The three major types of pilot licenses are listed in the radio group rgpQ1.1_License. When the user clicks on the button btnQ1_1_Cost, it displays the information based on the license type selected in the radio group. You may add the information using simple strings. Example Screenshots: MPL PPL CPL (4) Copyright reserved Please turn over
6 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) 1.2 You decide to start learning to fly based on the license type PPL (Private Pilot License) using an aircraft called a Cessna 182 RG (retractable gear). On the dashboard of the Cessna 182 RG, three lights represent whether the landing gear is retracted (in the up position) or extended and locked (in the down position). 1.2.1 Button [Q1.2.1 – Add the front wheel] You will notice when you run the application that the interface only displays the two rear wheels of the Cessna 182 RG and you need to add the front (nose) wheel. Using dynamic code, add the front nose wheel with the following properties: • Name the component: shpFrontWheel (variable has already been declared for you) • Change the shape to a circle • Set the position of shpFrontWheel to: o Top = 25 o Left = 35 • Set the size of shpFrontWheel to: o Width = 50 o Height = 50 • Change the colour of shpFrontWheel to clWhite NOTE: If you cannot complete the dynamic code for this question, add the shape without dynamic code so that you can complete QUESTIONS 1.2.2–1.2.4. Marks for the dynamic code will be forfeited. (6) 1.2.2 Button [Q1.2.2 – Raise landing gear] In the Cessna 182 RG, when you raise the landing gear, all three lights on the dashboard turn Red. Code the button btnQ1_2_2_Up to change all three lights to Red. (1) 1.2.3 Button [Q1.2.3 – Lower landing gear] In the Cessna 182 RG, when you lower the landing gear, all three lights on the dashboard turn Green. Code the button btnQ1_2_3_Down to change all three lights to Green. (1) 1.2.4 Button [Q1.2.4 – Test landing gear] When landing any aircraft with retractable landing gear, all landing gear must be in the locked position and the lights on the dashboard must be green. Provided code will randomise the landing gear position each time the user clicks the button. Code the button btnQ1_2_4 – Test to test whether it is safe to land. Display a message using a Message Dialog box to indicate the different landing conditions. Note the type of messages in each screenshot. Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 7 • 3 Red Lights → Catastrophic failure! • 1 or 2 Red Lights → Caution, not safe to land • 3 Green Lights → Safe to land (8) Copyright reserved Please turn over
8 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) 1.3 Button [Q1.3 – Top of Descent] In aviation, the Top of Descent is the transition from the cruising speed phase of a flight to the descent phase. This is the point at which the planned descent to final approach altitude and landing is initiated. The Top of Descent is usually calculated by an on-board flight management system. Your Cessna 182 RG does not have an on-board flight management system. Thus, you decide to create your own program to determine the Top of Descent. 3 Constant values have been created for you: • DEG_TO_RAD (degrees to radians) • NM_TO_FT (nautical miles to feet) • FT_TO_NM (feet to nautical miles) The user will enter the following information: • Start altitude and end altitude (measured in feet) • Start speed and end speed (measured in knots) • Wind speed (measured in knots) • Glideslope (measured in degrees) Vertical speed formula: • Average speed = (Start speed x End speed) ÷ (2 + Wind speed) • VerticalSpeed_NM_P_Min = tan(Glideslope x DEG_TO_RAD) x Average speed ÷ 60 • Vertical speed = VerticalSpeed_NM_P_Min x NM_TO_FT Distance formula: • Delta altitude = Starting altitude – Ending altitude • Delta Speed = Starting speed – Ending speed • Distance = (Delta altitude x FT_TO_NM) ÷ tan(Glideslope x DEG_TO_RAD) • Distance = Distance + the ceiling function of Delta speed divided by 10 • Distance = Distance + the ceiling function of Wind speed divided by 10 Estimated time formula: Estimated time = (Distance ÷ average speed) x 60 Using the formulas above, code the button btnQ1_3_Top_of_Descent to output the following information into the rich edit redQ1_3 • Vertical speed of descent (measured in feet per minute) • Distance to landing area (measured in nautical miles) • Estimated time to arrive at landing area (measured in minutes) (20) Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 9 See example screenshots on the following page: EXAMPLE 1 EXAMPLE 2 EXAMPLE 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. [40] Copyright reserved Please turn over
10 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) QUESTION 2: SQL AND DATABASE PROGRAMMING The data pages attached at the end of the question paper provide information on the design of the FlightInfo.mdb database and its contents. 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 Question2_u.pas. • 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. NOTE: • The ‘Restore database’ button is provided to restore the data contained in the database to the original content. • The contents 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. Descriptions of these variables are listed in the table below: Variable Data type Description tblFlight TADOTable Refers to the data stored in the table tblFlights tblPilot TADOTable Refers to the data stored in the table tblPilots qryInfo TADOQuery Query component that will query the two tables tblFlights and tblPilots • Use the ADO components tblFlight and tblPilot only in QUESTION 2.2. Example of graphical user interface (GUI): Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 11 2.1 In this section you may ONLY use SQL statements to answer QUESTION 2.1.1 to QUESTION 2.1.5. Code to execute the SQL statements and display the results of the queries is provided. The SQL statements are incomplete. NOTE: If you have coded and run QUESTION 2.2, then your results of QUESTION 2.1 will be different to the results in the example output. Please ensure you click the Restore Database button before executing the SQL statements. 2.1.1 Button [Q2.1.1] Write SQL code to display the Name, Surname, Age, and Email of all the pilots between the ages of 36 (inclusive) and 42 (inclusive), sorted by the age from oldest to youngest. Example of the output: (4) 2.1.2 Button [Q2.1.2] If the user wishes to see which flights are available to their required destination, they will enter their destination using an input box. The input box code has been provided for you and will store the value in the variable sLine. Write SQL code to display all the fields of all the records that contain the destination inputted into the input box. Example of the output if the word “Alfred” was entered: (4) Copyright reserved Please turn over
12 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) 2.1.3 Button [Q2.1.3] You would like to know how many aircrafts are flying in the month of September. Write SQL code to display the number of flights in September. Name the calculated field “Flights in September”. Example of the output: (3) 2.1.4 Button [2.1.4] The airlines would like to see the cost breakdown of all the flights based on the destination. Write a SQL statement to display the Destination, Pilot Cost, Flight Cost, and Total Cost of all the flights based on the destination. Example of the output: (12) Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 13 2.1.5 Button [Q2.1.5] All the CPL (Commercial Pilot License) certified pilots have been given a 7% raise on their Cost Per Flight. Write a SQL statement to increase only the CPL certified pilot’s salaries by 7%. NOTE: If you click on Button 2.1.4 after Button 2.1.5, the following output will be displayed. Only George, Graaff-Reinet, and King William’s Town had no change in pilot cost. This is because there are no CPL certified pilots in those towns. (3) 2.2 In this section, only Delphi programming code may be used to answer QUESTION 2.2.1 and QUESTION 2.2.2. Use the global variables, tblFlight and tblPilot, provided. NO marks will be awarded for SQL statements in QUESTION 2.2. 2.2.1 Button [Q2.2.1] A government regulation has been passed that a pilot can only be certified for a license if they are over the age of 21. Write code to delete all the pilots who are under the age of 21. Output to the rich edit redQ2_Output as per example screenshot. Example of the output: (3) Copyright reserved Please turn over
14 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) 2.2.2 Button [Q2.2.2] A breakdown of the different aircraft types (license requirement) needs to be displayed. To simplify output, the breakdown will be based on the destination airport. Write code to search, based on the destination selected in the combo box cmbQ2_2_2_Destination. Calculate and display how many different aircraft are there per license type. A list of how many co-pilots are required per the selected destination must also be displayed. Output to the rich edit redQ2_Output as per example screenshots. Example screenshots: (6) • 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] Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 15 QUESTION 3: OBJECT-ORIENTED PROGRAMMING Aircraft Flashcards are an excellent tool for learning about different types of aircraft. Inspired by this idea, you have decided to develop an application that will digitally replicate these flashcards. By loading various aircraft onto the digital platform, yourself and other users can not only gain knowledge about different aircraft, but also engage in interactive flashcard games with each other. 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 both the Question3ClassDefinition_u.pas and the Question3_u.pas files. • Do NOT remove or change any provided code. The following user interface is displayed: Follow the instructions below to complete the code for each section of QUESTION 3.1 and QUESTION 3.2. NOTE: For this question, you are NOT allowed to include any additional attributes or user-defined methods unless explicitly stated in the question. Copyright reserved Please turn over
16 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) Open the incomplete object class Question3ClassDefinition_u.pas. 3.1 The incomplete class (TAircraft) contains the declaration of attributes that describe the objAircraft object. NAME OF DESCRIPTION ATTRIBUTES fName String value containing Aircraft name fManufacturer String value containing Manufacturer Name fSpeed Real value containing Speed in Knots fHeight Real value containing Height in Feet fRange Real value containing Range in Miles fWeight Real value containing Weight in Pounds fWingspan Real value containing Wingspan in Feet fFirepower Integer value containing Range value between 1 – 10 fImageName String value containing Image name fCountry String value containing Country Image name fDescription Wide string containing the Aircraft description 3.1.1 Write code for a constructor method named Create that will receive the following parameters: Name Manufacturer Speed Height Range Weight Wingspan Firepower ImageName Country Description NOTE: These data items will be read from the Aircraft_List.csv text file in the Question3_u.pas unit and sent through to this constructor. Assign these parameter values to the correct attributes. (5) 3.1.2 The attributes (Speed, Height, Range, Weight, and Wingspan) need to be converted to a South African measurement system. Write code for a mutator method named setValues to convert the current attributes to their respective South African measurement values. The conversions are as follows: Knots to Kilometres per hour = 1.852 Feet to Meters = 0.3048 Miles to Kilometres = 1.60934 Pounds to Kilograms = 0.45359 (5) Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 17 3.2 An incomplete unit Question3_u.pas has been provided. It contains code for the object class to be accessible and a global object variable, objAircraft, already declared. Do NOT delete or change any provided code. The text file, Aircraft_List.csv, contains the details of 16 aircrafts shown below: NOTE: The first line of the text file contains the headings of the different categories of the aircraft. The images for the flags can be found in the Folder: Images\Flags\ The images for the aircraft can be found in the Folder: Images\Aircraft\ Follow the instructions below to code the solution. 3.2.1 Combobox [Q3.2.1 – cmbQ3_SelectAircraft] When the program executes, the user will see a blank flashcard. The user will choose which aircraft they would like to display by selecting the different aircraft from the combo box. Code the OnChange event handler of the cmbQ3_SelectAircraft combo box to do the following: 1. Extract the user’s selection from the combo box. (1) 2. Test to see if the text file exists and assign the file. If the file does not exist, display a suitable message and exit. (5) 3. Loop through the text file until the user’s selected aircraft has been found. (6) 4. If the aircraft has been found: • Write code in the loop to extract the information from the text file and store it in the already declared local variables. (5) • Using the extracted values in the variables, instantiate (create) the object objAircraft. (3) NOTE: Only one aircraft will be loaded into the object. This is based on the user’s selection from the combo box. Copyright reserved Please turn over
18 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) 5. Once the aircraft has been found and the loop has exited, use the object objAircraft to call the setValues method. (1) 6. Using the object objAircraft, load the data into the following components: lblQ3_AircraftName lblQ3_Manufacturer imgQ3_CountryFlag imgQ3_AircraftImage lblQ3_AircraftDescription lblQ3_MaxSpeed lblQ3_MaxHeight lblQ3_Range lblQ3_MaxTakeoffWeight lblQ3_Wingspan lblQ3_Firepower (4) Example: Screenshot of the flashcard when an aircraft has been successfully found, extracted from the text file, instantiated into the object and then object’s data values loaded into the flashcard. • 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] Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 19 QUESTION 4: PROBLEM-SOLVING PROGRAMMING One of the local airline companies has asked you to assist them with creating a booking application for their new aircraft, the Mitsubishi SpaceJet M100. The SpaceJet M100’s cabin is configured with 15 rows of two seats on the left and two seats on the right of the aisle. The first two rows of the cabin are assigned to business class, and the remaining rows are assigned to economy class. 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. • Do NOT remove or change any provided code. • Assume the user will enter the correct information into the input components. You will not be required to enter any data validation code on the input components. The following user interface is displayed: If the image on your GUI does not line up like the image in the GUI screenshot, then set Windows Scaling to 100%. Aircraft image source: Skypark Secure https://www.skyparksecure.com/blog/fastest-plane-boarding- methods/ The user interface makes use of a String Grid component to display the availability of seats on the aircraft. All the data indicating whether a seat has been booked or not, is stored in a 2D array, named ar2Booking. This 2D array will be used to update the String Grid component and change the seat colour. NOTE: All String Grid code has been provided for you. Do not delete or alter the String Grid code. You will NOT need to write any String Grid code. Copyright reserved Please turn over
20 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) Breakdown of the data: Character code stored in the Availability String Grid Cell 2D array: ar2Booking Colour ‘B’ Booked seat Blue ‘A’ Available seat White ‘I’ Aisle Gray Follow the instructions below to complete the code for each section of QUESTION 4, as described in QUESTION 4.1, QUESTION 4.2, and QUESTION 4.3. 4.1 The airline allows passengers to book flights from Gqeberha. The information regarding to the availability of seats to the various destinations is stored in the following globally declared 2D arrays. This code has been done for you and must not be altered or removed: • Bloemfontein ar2Bloemfontein • Cape Town ar2CapeTown • Durban ar2Durban • East London ar2EastLondon • Johannesburg ar2Johannesburg Write code on the onChange event handler of cmbQ4_1_Destination to do the following: 1. Extract the user’s destination from the combo box. (1) 2. Transfer the data from the destination 2D array to the globally declared 2D array, ar2Booking. (5) 4.2 The application must provide the user the ability to book a seat. After they have selected their destination, the user will fill in their details into the remaining input components. Write code for the onClick event handler of the panel named pnlQ4_2_Book (the panel acts like a button) to do the following: 1. Extract the seat number and loop through ar2Booking to determine if the seat has been booked or not. ‘A’ = Available ‘B’ = Booked ‘I’ = Aisle NOTE: That there are only four seat columns A..D, however, ar2Booking has 5 columns of which the 3rd column stores the aisle. Write your code to ensure that columns A..D match with the correct columns in ar2Booking. If the seat has been booked, display a message that the seat has already been booked. (5) Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 21 2. If the seat has not been booked, book the seat in ar2Booking and extract all the data from the various input components. The prices for the various flights are stored in a global array named arrPrices. Each destination has a different price based on the destination. Business class passengers pay 95% more for their flights than economy class passengers. Output the seat ticket information into the rich edit redQ4_Output as per example screenshots. (12) 4.3 The airline would like to see statistics of the various flights. Write code for the onClick event handler of the panel named pnlQ4_3_Stats (the panel acts like a button) to do the following: 1. Extract the destination. 2. Loop through ar2Booking to determine how many business class and economy class passengers are there. 3. Determine the cost for business class as well as economy class. Business class passengers pay 95% more than economy class passengers. Prices are stored in the global array, arrPrices. 4. Output the statistics of the flight into the rich edit redQ4_Output as per example screenshots on the following page. Copyright reserved Please turn over
22 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) These screenshots are of the different destinations without extra seats booked. Bloemfontein Cape Town Durban Johannesburg • 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] GRAND TOTAL: 150 Copyright reserved Please turn over
(EC/SEPTEMBER 2023) INFORMATION TECHNOLOGY P1 23 DATABASE INFORMATION QUESTION 2: The design of the database tables is as follows: Table: tblFlights The table contains the information of the various flights. Example of the first twenty records in the tblFlights table: Table: tblPilots This table contains the information of the pilots. Copyright reserved Please turn over
24 INFORMATION TECHNOLOGY P1 (EC/SEPTEMBER 2023) Example of the first twenty records in the tblPilots table: NOTE: Connection code has been provided. The following one-to-many relationship exists between the two tables in database: Copyright reserved Please turn over

Study this subject

More from Grade 12 Information Technology

View all