INFORMATION TECHNOLOGY
GRADE 12
PAPER 1 
NSC PAST PAPERS AND MEMOS
SEPTEMBER 2017

MEMORANDUM 

QUESTION 1 

MAX  MARKS

MARKS  ACHIEVED

1.1 

FORM CREATE: DYNAMIC COMPONENT 
Imgmedical := Timage.create(frmQuestion1); ✔
Imgmedical.parent : frmQuestion1; ✔ 
Imgmedical.left := 500 AND imgmedical.top := 15; ✔
Imgmedical.height := 90 AND imgmedical.width := 120; ✔
Imgmedical.stretch := true; ✔ 
Imgmedical.picture.loadfromfile(‘medical.jpg’); ✔
Imgmedical.visible := true; ✔

7

 

1.2 

GENERAL INFO BUTTON 
Get title from combobox✔ 
Get name and surname from edit box✔ 
Get ID number from edit box✔ 
Test if ID’s length is 13 digits✔ 
 If length is 13 digits✔ 
 Check for only numbers✔ 
 If only numbers ✔ 
 Randomize a number between 100 and 999 (both   included)✔ 
 Extract the initial✔ and surname✔ 
 Compile a file name using the first three  
 characters✔of the surname and the random   number✔ 
 Display a welcome message including the title, initial,  surname and the file name✔
Display a message if ID’s length is not 13 digits✔

14

 

1.3 

MEDICAL AID INFO BUTTON 
Check if Main Member checkbox is selected✔ If the Subsidy checkbox is selected then ✔ 
 Subsidy must be ‘Yes’✔ 
Else 
 Subsidy must be ‘No’✔ 
Get the number of dependents from the radiogroup✔ Get the medical aid name from the listbox✔ 
Writing to file: text file name must be the file name   created in Question 1.2✔ 
Assignfile✔ 
Rewrite✔ 
Write the file name, number of dependents, medical aid  name and whether they have a subsidy to the text file✔
Must be on separate lines✔ 
Close the file✔ 
Display a message indicating that the file was written✔

13

 
1.4

UPDATE INFO BUTTON 
Get the system date✔ 
Extract the year of date✔ and increase it by one year✔
Create the new date✔ 
Display a message including the date when details must  be updated✔

5  
    39  

QUESTION 2 

MAXIMUM  MARKS

MARKS  ACHIEVED

2.1.1 

CONSTRUCTOR CREATE 
Constructor heading with correct paramters✔ 
Assign parameter values to attributes: 
fdoctor, fdate, ffollowup (string attributes) ✔
fmedaid (boolean attribute) ✔ 
initialising fmed and fpayment to 0 ✔

4

 

2.1.2 

FUNCTION FOLLOWUPDATE 
Function Heading  
If ffollowup attribute is ‘Yes’ ✔ 
 Add 7 days to the date✔ 
 If days more than 30✔ 
 Change the days (-30) and add 1 to month✔ 
Compile the follow-up date✔ 
 Else (if days less than 30) ✔ 
 Compile the follow-up date ✔ 
Else (if followup attribute is ‘No’) ✔ 
result must be 'No Follow-Up Appointment  Needed';✔

9

 

2.1.3 

SETPAYMENT METHOD 
Correct method with parameter ✔ 
Increase fpayment by parameter✔

2

 

2.1.4 

SETMED METHOD 
Correct method with parameter ✔ 
Increase fmed by parameter✔

2

 

2.1.5 

COMPILESTRING 
Correct method definition with string return type✔ 
If ffollowup is ‘Yes’✔ 
 Return doctor name attribute as well as  followupdate method ✔ 
if ffollowup is ‘No’ return followupdate method✔  ✔

5

 
2.2.1

Capture Info Button 
if/case statement✔ 
 get the doctor’s name✔ 
 increase the counter for the particular doctor✔
get the system date✔ 
If checkbox is checked✔ 
 Med aid is true✔ 
Else 
 Med aid is false✔ 
Get follow up (‘Yes’ or ‘No’) from editbox✔ Create the object✔
with correct parameters(sdoctor,  sdate, sfollowup, bmedaid) ✔ 
Call the compilestring method✔ 
Randomise a number between 300 and 400✔ 
randomrange(300,401) or random(300) + 101 If bmed is false then   Call SetPayment method with parameter✔ 
Add amount to total ✔ 
 Display using getpayment✔ – currency and two  decimal places✔ 
else✔ 
 Call SetMed method with parameter✔ 
 Display message✔ – charged to medical aid  Add amount to total✔

20  
2.2.2

Display total amount of cash for the day✔
Display total amount charged to medical aid✔
Amounts formatted as currency and two decimal  places✔
Display number of patients each doctor has seen✔
All information on new lines✔

5  
    47  

QUESTION 3 

MAX MARKS

MARKS  ACHIEVED

3.1 

FORMCREATE 
Row Headings (appointment times)✔ 
Column Headings (doctor names)✔ 
Declare 2d-array with class scope (ar2appointments) ✔ 
Test if file exists✔ 
 Display a message if file does not exists✔ 
Assign and Reset the file✔✔ 
Read the first line in text file (doctors’ names) ✔
Loop 10 times✔ (rows) 
 Read next line in text file✔ 
 Loop 4 times✔ (columns) 
 Extract the patient’s name✔ 
 Extracting the last name correctly✔ 
 If it is a patient’s name (not -)✔ 
 Assign to 2d array✔ correct row and column✔ 
Display the contents of the 2d-array by calling a display   method✔ 
Display method: 
Outer loop✔ 
 Inner loop✔ 
 Display 2d-array[row,col]✔ in stringgrid[col,row]✔

21

 

3.2.1 

INSERT METHOD 
Method receiving name and column as parameters✔ 
Randomise a number 1 to 10 (both included) to   represent the time slot✔ 
If column is 1 to 4 then refers to specific doctor✔ 
Conditional loop✔ 
 If that particular doctor has an opening ✔ 
 Assign name to opening in 2d array✔ 
 Else✔ 
 Randomize a new timeslot✔ 
Else (if column is 5 – any doctor)✔ 
 Conditional loop✔ 
 Randomize between 1 to 4 (both included) to select a  doctor✔ 
 If that particular doctor has an opening✔ 
 Assign name to opening in 2d array✔ 
 Else✔ 
 Increase counter to select new timeslot for that   doctor✔
Display a message if an appointment has been made✔
Else 
 Display a message that an appointment has not been   made✔

17

 
3.2.2

ADD APPOINTMENT BUTTON 
Get the doctor’s index✔ 
Get the patients name and surname✔ 
Call the Insert method✔ 
Call the display method✔ 
(Accept any alternative display code, as learners will be  penalised in 4.1)

4  
3.3

CHANGE APPOINTMENT BUTTON 
Get the patient’s name and surname✔ 
Outer loop✔ 
 Inner loop✔ 
 If patient is found✔ 
 Call the Insert method with the patient’s name and  Doctor’s index as parameter✔
 Delete the original appointment in the 2d-array✔
Display the updated array✔

7  
3.4

SEARCH BUTTON 
Get the patient’s name✔ 
Outer loop✔ 
 Inner loop✔ 
 If name is found in 2d array✔ 
 Display a message including doctor and time✔

5  
3.5

DOCTOR WALK-IN BUTTON 
Initialise the minimum variable✔ 
Outer loop✔ 
 Initialise the counter✔ 
 Inner loop✔ 
 If 2d-array[row,col] is empty✔ 
 Increase counter✔ 
 If counter < min✔ 
 Assign counter to min✔ 
 Assign the specific column (doctor) to a variable✔ 
Display a message to indicate which doctor will see  patients without appointments✔

10  
    64  

SAMPLE SOLUTIONS 
1
2
10
11
12
13
14
15
16
17
18

Last modified on Thursday, 22 July 2021 09:24