<=Back

<=KNEC Diploma in ICT module 2 Object Oriented Programming past paper:2014

Namu intends to design an application module based on object orientation. Explain three outcomes of the object design phase

    Viewed:  479  times

  Share in:
        

Question Answer:





Questions List:

1. Outline four characteristics of object oriented programming language
2. Explain the term abstract data type as used in OOP
3. Distinguish between header file and in-built function as used in C++ programs
4. Joseph intends use OOP to develop his trade project. Explain two benefits he is likely to derive from this decision
5. Write a C++ program that implements a class named triangle with the following properties •has data members named base and height; •a member function named calculate for inputting base and height, determining the area of triangle and outputting the area.
6. Distinguish between portability and machine independence as used in programming
7. Explain the following terms as used in OOP: I.Abstraction II.dynamic binding
8. Outline three logical operators used in C++ programs
9. Interpret the following C++ program segment. (6 marks) class student{ long int roll no; private: int age; char sex; float height; public student ( ) ; void getdata ( ) ; void disinfo (void) ; int process (int age, int sex) ; };
10. Namu intends to design an application module based on object orientation. Explain three outcomes of the object design phase
11. Explain the circumstance under which each of the following concepts are most applicable in C++ programs I.Comments; II.Resolution operator.
12. Explain the term declaration as used in programming
13. Read the following extract and answer the question that follows. When ordering new videotapes from a supplier, the store manager creates a purchase order, fills in the date, the supplier’s name, address, and enters a list of videotapes to be ordered. The purchase order is added to a permanent list of purchases. When one or more video tapes are received from a supplier, a clerk locates the original
14. Outline the general syntax of defining an inline function
15. Explain the following terms as used in classes: (4 marks) i.encapsulation; ii.Instantiation
16. With the aid of an example, describe explicit type casting as applied in C++ programs
17. Distinguish between member and friend functions as used in C++ programs
18. Write a C++ program that will initialize two objects as follows: Rectangle 1 L =10.5 and W= 8 Rectangle2 L = 7 and W=3.2 The program should then determine the perimeter of the objects through the use of a friend function and output appropriately. Use a constructor.
19. Write a C++ program that will initialize two objects as follows: Rectangle 1 L =10.5 and W= 8 Rectangle2 L = 7 and W=3.2 The program should then determine the perimeter of the objects through the use of a friend function and output appropriately. Use a constructor.
20. Write a C++ program that will initialize two objects as follows: Rectangle 1 L =10.5 and W= 8 Rectangle2 L = 7 and W=3.2 The program should then determine the perimeter of the objects through the use of a friend function and output appropriately. Use a constructor.