August 2000 QUESTION 1 (Compulsory) Total Marks: 30 Marks |
Click here to access
other questions
Click to access |
(a) Briefly explain what is meant by
each of the following terms in object oriented (b) (i) State the number of destructors
a class may have. [1 mark] (c) (i) Write a class, called Motherboard,
which contains the following: (d) Give the output of the following
C++ program: (e) Write a template function, called IsMember, which takes three arguments. The first argument is an array of template type T, the second is a datum of template type T, and the third is an integer specifying the length of the array. The function should return the index of the first element in the array matching the datum, or 0 if there is no matching entry. You may assume that overloadings of any necessary operators exist. [6 marks] |