INFORMATION TECHNOLOGY PAPER 1
GRADE 12
NATIONAL SENIOR CERTIFICATE
SEPTEMBER 2018

INSTRUCTIONS AND INFORMATION

  1. This question paper is divided into THREE sections. Candidates must answer ALL the questions in ALL THREE sections.
  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 Delphi 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. 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: ExPo*18@
      Once extracted, the following list of files will be available in the folder
      DataSept2018:

      Question 1:

      Question1_u.pas
      Question1_u.dfm
      Question1_p.dpr
      Question1_p.res
      Schools.txt
      Tertiary.txt

      Question 2:
      clsVenues.pas
      Question2_u.pas
      Question2_u.dfm
      Question2_p.dpr
      Question2_p.res

      Question 3:
      Question3_u.pas
      Question3_u.dfm
      Question3_p.dpr
      Question3_p.res

QUESTION 1: GENERAL PROGRAMMING SKILLS
You have to register to take part in the ICT Expo. Complete the code for the registration process.
Open the project, Question1_p in the Question 1 folder.
1.1 Button [REGISTER]
The user must enter their details in order to register for the ICT Expo. The following information must be entered:

  • Name and Surname
  • Contact Number
  • Age
  • Select the group they are representing: Student, Teacher or Business

Separate the name and surname
The contact number must consist of ten numerical values and must start with a ‘0’. If the contact number is not correct, the edit field must be cleared, cursor must be placed in the edit and a suitable message must be displayed indicating that the user must re-enter the contact number. If the contact number is correct, then the OnceOffPassword button must be shown and a message, ‘Information Captured’, must be displayed.
Example of output if contact number is NOT correct:
1
Example of output if the contact number IS correct:
2
(19)
1.2 Button [ONCE-OFF PASSWORD]
A once-off password must be created, which the user will need to complete the registration process.
The once-off password will consist of three randomly generated letters. Make use of the arralphabet array, which has been declared already, to get the random letters. A number between 100 and 999 (both included) must be added to the three letters. The last digit of the once-off password will be the first letter of the information received from the combobox component (in Question 1.1). The panel, pnlOnceOffPassword, must be displayed.
3
If the user is either a student or a teacher, then pnlRep must be displayed. On pnlRep the user must select whether he/she is from a school/college or university. If the user is from a school, a text file (Schools.txt) containing the programme for school-going children must be displayed in the output component. If the user is from a college or university, then the Tertiary.txt text file must be displayed.
4
If the user is representing a Business, then the following message must be displayed using a Showmessage: Full programme available on the Facebook page.
5
(25)
1.3 Button [SUMMARY OF INFO]
Display a summary of all the information entered by the user in the following format:
REGISTRATION INFORMATION
<Initial> <Surname>
<Representing>(<Age>)
A message will be sent to <contact number>, please reply with your once-off password.
Example of output: 
6
(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. [49]

QUESTION 2: OBJECT-ORIENTED PROGRAMMING
All the companies who would like to have a stall at the Expo, must book their tables and chairs in advance so that the staff at the venue can pack it out in the different exhibition venues.
Do the following:

  • Open the incomplete program in the Question 2 folder.
  • Open the incomplete object class clsVenues.pas.
  • Compile and execute the program. Currently the program has no functionality.

The following user interface is displayed:
7

  • Complete the code for this program, as specified in QUESTION 2.1 and QUESTION 2.2.

2.1 The incomplete object class (TVenues) contains the declarations of five attributes that describe the Venues object.
The attributes for the Venues object have been declared as follows:

NAMES OF ATTRIBUTES DESCRIPTION
ftables  The number of tables needed 
fchairs  The number of chairs needed 
fplug  Whether a plug point is needed 
farea  The total area required 
fvenue  The venue that is allocated based on size and plug points 

2.1.1 Write the code for a constructor method that will receive the number of tables, number of chairs and whether a plug point is required (‘Yes’ or ‘No’). Assign the received parameter values to the respective attributes. (3)
2.1.2 Write the code for a method called CalculateArea that will use the constant values to calculate the total area that will be required for the number of tables and chairs that have been requested.
Constant values: Table = 1.2 and Chair = 0.64
The area must be rounded off to the nearest whole number, for example, if the area required is 23.12 square metres, the area that will be allocated will be 24 square metres. Call the ExhibitArea method. (4)
2.1.3 Write a method called ExhibitArea that will return the venue which will be allocated to the company based on the size they require and whether a plug point is required or not.
Use the following table to find the venue that must be assigned to the company:

Area (in m2) Plug Point Venue
0–10   No  Exhibition Area A
   Yes  Exhibition Area B
11–20   No  Exhibition Area B
   Yes  Exhibition Area B
21–30   No  Exhibition Area C
   Yes  Exhibition Area C
More than 30   No  Exhibition Area D
   Yes Exhibition Area C
    *the venue is NOT big enough for the
number of tables and chairs that the
company requested. Exhibition C can only
accommodate an area of 30 square
metres. A table and three chairs must be
taken away until the area is 30 square
meters or just less than 30 square meters.
Call the CalculateArea method to
recalculate the area.

(21)
2.1.4 Write code to complete the given toString method that will return a string with attributes in the following format:
DETAILS
Number of Tables <number of tables>
Number of Chairs <number of chairs>
Plug point needed <Yes or No>
Total Area required <area> square metres
<venue> (7)
2.1.5 Write a method called GetVenue that will return the venue allocated to the company. (2)
2.2 An incomplete unit Question2_u.pas has been provided.
The user must enter the following information:

  • Name of the company
  • Number of tables they need
  • Number of chairs they need
  • Whether a plug point is required or not (Yes or No)

Do the following:

  • Instantiate the objVenues object.
  • Call the CalculateArea method to calculate the area that is required.
  • Display the information in the output area using the tostring method.

The information must be written to a file so that it can be given to the workers to set up the venues. If the file, Venues.txt, does not exist, then it has to be created, otherwise the information must be added to the existing file.
The information must be stored in the following format:
Company name-Venue
Example of output:
8
(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. [55]

QUESTION 3: PROBLEM-SOLVING PROGRAMMING
The ICT Expo supports many local charities. Donations are made during the week of the Expo and the donations are handed over to the different charities at a special function.
3.1 Declare a two-dimensional array, ar2Donations, with class scope. There are 6 charities and donations can be made on 4 days.
The following must happen when the form is created:

  • The richedit (redoutput) must be formatted to display all the information in neat columns.
    Use the following tab stops: 70; 100; 130; 160 and 190:
  • ar2Donations must be filled with random values between 1000 and 10000. (9)

3.2 Write a method called Display which will display the contents of ar2Donations as shown in the example of output. Both richedits must be cleared before any content is displayed. (12)
3.3 When the Donate button is clicked, the input that the user has typed in must be processed. The amount entered must be added to the correct charity as well as on the correct day. Display the updated array by making use of the Display method.
The total amount that has been raised so far must be displayed in the richedit, redStats. The charities must also be ranked from the one receiving the most donations to the one receiving the least. (25)
Example of output:
9

  • 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. [46]

TOTAL: 150

Last modified on Thursday, 09 September 2021 08:20