Professional Documents
Culture Documents
IFM01B1
IFM01B1
CAMPUS APK
EXAM Paper 1
ASSESSORS D COTTERRELL
HJC VAN DER WESTHUIZEN
THIS QUESTION PAPER CONSISTS OF SEVEN (5) PAGES INCLUDING THE COVER PAGE
INSTRUCTIONS:
1
IFM01B1 / IFM1B10: INFORMATICS 1B – NOVEMBER EXAMINATION 2022
QUESTION 1 (UML)
Draw the UML class diagram to demonstrate the concepts of Inheritance, Composition and
Interfaces by considering the class Bird.
1.1 Define the Bird class – it must have at least two attributes and one (2)
appropriate method (constructor and property methods do not count).
1.2 Define two additional classes which both inherit directly from Bird – they (4)
must each have two attributes and one appropriate method each
(constructor, property methods, and overridden methods do not count).
1.3 Using one of the derived classes demonstrate composition. The (2)
component class must consist of two attributes, and one method
(constructor and property methods do not count).
1.5 Be sure to use the correct logic and correct UML notation. (5)
[15]
2
IFM01B1 / IFM1B10: INFORMATICS 1B – NOVEMBER EXAMINATION 2022
QUESTION 2 (Recursion)
a) In terms of x, y, and z, what does the following function calculate? (5)
If you believe that the function calculates x + y + z, then your answer should be
x + y + z.
Clearly indicate your final answer.
b) Write the recursive function based on the following formula in Visual Basic (5)
code:
[10]
QUESTION 3 (Programming)
Consider the following classes Planet (is the base class), GasPlanet, DwarfPlanet,
HeavyPlanet and frmQuestion3. Using the classes provided above, demonstrate that you
understand the following programming concepts by writing sufficient and appropriate Visual
Basic code (i.e. the code must be relevant to the above classes) to illustrate the concepts in
question:
a) Inheritance {VB} (3)
b) Upcasting {VB} (3)
c) Polymorphism {VB} (2)
d) Composition {VB} (3)
e) Downcasting {VB} (4)
f) Overriding with extension {VB} (6)
NB!!!
• Clearly indicate where each class begins and where each class ends.
• Clearly indicate where you are attempting to illustrate a particular concept in your code.
3
IFM01B1 / IFM1B10: INFORMATICS 1B – NOVEMBER EXAMINATION 2022
[21]
QUESTION 4 (Collision Handling)
You have been provided with the following table that contains the hashed values of the keys.
You need to place the value into a random-access file in the order they are listed in the table
below (entry value is the insert order). The file can only handle 13 values. Given that the
records are inserted into the file in the order tabled below, illustrate the contents of the full
random-access file if the following collision handling methods are used:
4
IFM01B1 / IFM1B10: INFORMATICS 1B – NOVEMBER EXAMINATION 2022
Where applicable (this will be denoted by {VB} in the question), provide syntactically correct
Visual Basic code (along with any necessary declarations) for the following questions:
a) What is the maximum byte size of the record structure called Bike? Show the (3)
working out.
b) Provide a function called CalcFilePos that will return the file position of a given (3)
record key. {VB}
c) Create a sub routine to save a given record to file using the filename “Question (6)
6.dat” make use of the function created in question 6b. {VB}
d) What type of a function is used in Question 6b? (1)
[13]
Discuss how a study of the different Belbin roles can contribute to better team cohesion in
software engineering projects. Would understanding the Belbin roles helped in how your
team assignment was managed, explain how?
Additional, discuss two of the personal challenges you encountered and how you may go
about to address these challenges better in future when it came to the group assignment.
[10]
THE END