Click to follow our Afritutor YouTube Channel, subscribe and click notifications and get updates on new learning videos


<=Back

<=KNEC Diploma in ICT module II Object Oriented Programming past paper: November 2017

Explain the procedure of destroying local and global object in the same program

    Viewed:  260  times
For Better experience and learning,for video answers, after video ends playing, click next question in the questions list!!!

  Share in:
        

Question Answer:





Questions List:

1. List four sample data types used in C++ programs
2. Outline two guiding rules for naming variables in C++ programs
3. Explain two features of parameterized constructors as used in OOP
4. Differentiate between classes and structures as used in OOP
5. Explain the term recursive function as used in C++ programs
6. Write a C++ programs to that will implement a class named cone with the appropriate dimensions only. The program should accept the dimension and determine and output the volume of cone. Hint: volume= #1/3πr^2#h.
7. Explain the procedure of destroying local and global object in the same program
8. C++ programming language supports object oriented programming. Outline six features that justify this statement
9. Outline four forms of inheritance applied in OOP
10. Write a C++ program that will implement a class with the properties in table 1. Use a pointer to access the appropriate members of the class. (6 marks) Feature Description Data member Data structure to store number of votes for six polling stations Member function Function to accept the number of votes for six polling stations, determine and output the total number of votes. Tables 1: Properties
11. Outline four components of a loop as used in C++ programs
12. Explain the term internal documentation as used in C++ programs
13. Outline two uses of program documentation
14. A super class named object has the following properties: • Length and width as data member • Constructor Write a C++ program to implement a sub class for the super class. The sub class ha height and a method used to accept the value of height, determine and output the volume. The program should initialize length and width as 7.0 and 5.0 respectively
15. Describe a message as applied in OOP.
16. Outline four properties of abstract data types (ADT)
17. Explain the circumstances under which each of the following features as used in object oriented programming; (i) Virtual base class (ii) Friend function;
18. Distinguish between states and behavior as used in OOP
19. Write a C++ program that outputs a string of characters from the keyboard to a file
20. Outline four benefits of inheritance in application development
21. Explain three types of operations that could be carried out on a class
22. Distinguish between cohesion and coupling as applied to object
23. Write a C++ program that will implement a class containing the dimensions of a rectangle and a parameterized function to initialize the dimensions an object of the class as 12 cm and 5 cm respectively. The program should then pass the object to a function which determines the length of the diagonal. Output the length of the diagonal
24. Assuming C++ programming language, describe the general syntax of a copy constructors
25. Inheritance can be extension or contraction. Explain these terms in respect to OOP
26. With the aid of an example in each case, explain the following types of polymorphism; (i) Coercion; (ii) Parametric.
27. Peter would like to determine the difference between two 1x2 matrixes (A [3,6] and B [2,4] using OOP. Write a C++ that could meet peters objective using objects and an overloaded operator. The program should output the difference (A-B). (8 marks)
28. State one advantage and one disadvantage of using inline function in OOP
29. Explain each of the following terms as used in C++ programs: I. Access-specifier; II. Pass-by-value.
30. Differentiate between virtual functions and pure virtual functions as used in OOP
31. Augustine intends to use OOP software for software project. Explain two ways in which she could cope up with new version and packages of the software
32. Write a C++ program that will implement the relationship depicted in the figure 2. The program should output the area of each child.
33. Distinguish between classes and structs as used in OOP
34. Describe two circumstances under which references could be used in OOP
35. Files can be accessed using different open modes values. Outline four such open modes used in C++ programs.
36. Write a C++ program that would define an abstract base class named bill with data member named units and standingfees, a member function named init( for initializing standingfeee and units) and a polymorphic function for determining the consumption costs. The program should implement the polymorphic function in two derived classes named water and electricity based on the following information:


About Us

Contact us

Terms of use | Privacy policy

Follow Us:               

All Rights Reserved © 2024; pscustudies.com