Ooad
Ooad
Ooad
a) Differentiate between early binding and late binding, with an example explain how
late binding can be achieved in C++.
[6 Marks]
b) Describe the concept of template classes in C++. Give an example.
[5 Marks]
a) Describe the concept of function abstraction in object oriented programming.
[3 Marks]
b) Describe how function abstraction can be realized in C++.
[6 Marks]
a). Write a program in C++ that calculates and displays the weekly salary for an
employee who earns Kshs 2500 an hour, works 20 regular hours, 10 overtime
hours, and earns time and one-half (wage * 1.5) for overtime hours worked. Create
a separate method to do the calculation and return the result to be displayed. Your
program should contain a class that holds the employee details indicated as well
as the method to do the computation
[8 Marks]
b). Describe the concept of inline function in C++.
[3 Marks]
c). Discuss the concept of message passing in object oriented programming.
[2 Marks]
d). Using function write a program in C++ to take two arrays of integer numbers and
multiply each corresponding values and put the result in a third array.
[7 Marks]