INFORMATION TECHNOLOGY PAPER 1
GRADE 12
NATIONAL SENIOR CERTIFICATE
SEPTEMBER 2018
INSTRUCTIONS AND INFORMATION
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:
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:
Example of output if the contact number IS correct:
(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.
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.
If the user is representing a Business, then the following message must be displayed using a Showmessage: Full programme available on the Facebook page.
(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:
(5)
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:
The following user interface is displayed:
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:
Do the following:
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:
(18)
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:
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:
TOTAL: 150