Afritutor
Study Portal
Menu
Home
College Level
Junior & Senior secondary
All Senior and Junior Resources
Grade 7 Exams
Grade 8 Exams
Grade 9 Exams
Grade 10 Exams
JSS Schemes of Work
JSS Study/Class Notes
JSS Lesson Plans
JSS Holiday Homeworks
Senior School Schemes of Work
Senior School Study/Class Notes
Senior School Lesson Plans
Senior School Holiday Homeworks
All Classes Online Video Lessons & Revision(
Highly Demanded
)
Grade 9 Online Videos Revision
Lower & Upper Primary
All Lower and Upper Primary Resources
Play Group Exams
PP2 Exams
PP1 Exams
Grade 1 Exams
Grade 2 Exams
Grade 3 Exams
Grade 4 Exams
Grade 5 Exams
Grade 6 Exams
Schemes of Work
Study/Class Notes
Lesson Plans
Holiday Homeworks
All Academic resources
Premium Content
Join
Login
<=Back
<=KNEC Diploma in ICT module II Object Oriented Programming past paper: November 2021
Define the term static object as used in OOP
 Viewed:
681
times
Share in:
Question Answer:
Login to View Answer
Questions List:
1.
Outline three typical steps of writing an object-oriented program
2.
Explain two advantages of OOP over structured programming
3.
Distinguish between implicit and explicit type casting as used in C++ programs giving an example in each case.
4.
Explain the circumstance under which the following data type are most applicable in OOP: (i) struct; (ii) Class
5.
Write an object-oriented program in C++ that would accept the dimension of a right-angled triangle, determine and output its perimeter. Use appropriate data member and one function member
6.
Outline four properties of unstructured programming languages
7.
Explain the term state and behavior as used in OOP
8.
Distinguish between selector operations and conversion operations as applied on object in OOP
9.
Study the following C++ program segment and answer the questions that follows. #include<iostream> using namespace std; class myclass{ int a; public: void set_a(int i){a=i;} }; Interpret the program segment clearly outlining the access specifier used. (3 marks)
10.
Write a C++ program that will create an object from a class named marks with the following properties: (5 marks) - a data member named scores which is an array of 6 elements; -a member function named mean for inputting the marks, calculating the mean and outputting the mean scores
11.
Evaluate each of the following C++ statements; (i) K=6*5/ (5%3)-3^2*10; (ii) 78>= (128%20) ^2+2*4-100/5;
12.
State one advantage and one disadvantage of using inline function in OOP
13.
Explain the term dereferencing as used in object-oriented programs
14.
With the aid of a C++ program segment, explain the role of a friend function in OOP.
15.
Write a C++ program that uses an overload function named calculate to determine the area or volume of rectangular object based on the number of parameters provided. The program should determine and output the area or volume appropriately for Object1(12,8) and Object2(6,5,4), use function prototype
16.
Explain the term free store as used in OOP
17.
Distinguish between a null pointer and a dangling pointer as used in OOP
18.
Outline four types of literals in C++ programming
19.
With the aid of a C++ oriented general syntax, explain a copy constructor as used in OOP
20.
Write a C++ program that implements a class with the following properties: - data member as a, b and c i.e. principal amount, interest rate per annum and number of years respectively that are initialized as 10000,0.2 and 4 - member function for calculating and outputting the interest on the principal amount. (6 marks) Use a constructor.
21.
Outline three situations when there is need to initialize an object during object oriented programming
22.
Explain the following terms as used in OOP (i) destructor; (ii) reference
23.
Differentiate between multilevel inheritance and multiple inheritance as used in OOP
24.
Define the term static object as used in OOP
25.
Write a C++ program that will implement a class named reflection whose object A (2,4). B (2,7) and C (8,4) are reflected along the y-axis by negating the x coordinates using an overloaded operator. The program should display the coordinate of the resultant image.
26.
Describe the following data types in OOP. (4 marks) (i) Enumerated; (ii) Nested class;
27.
State two bitwise operators as used in C++ programming
28.
Overloading is a type of polymorphism in OOP. Justify this statements with respect to addition operator
29.
Prince has been advised to exploit inheritance when designing his OOP. Outline four benefits of inheritance that could have influenced the advice
30.
Write a C++ program that will open a file named myfile on drive F for output (capture an error if the file is not open). The program should then output the string “polymorphism and inheritance” to the file and close it
31.
Outline four values of type openmode used in C++ file operation
32.
Outline the term default constructor as used in C++ program
33.
With the aid of the general C++ syntax, Explain inheritance as used in OOP
34.
Differentiate between extension and limitation as forms of inheritance as used in OOP
35.
John would like to use polymorphic class to determine the volume of a cone and cylinder. Write a C++ program that would use to: - define class named threeD that has data members named radius and height, a parametric member function named set which is used to initialize the value of radius and height. - implement two derived classes from threeD named cone and cylinder whose radius and height
36.
Outline two advantages of using files over simple data types in OOP
37.
Distinguish between virtual function and overloaded function as used in C++ programs
38.
Explain two challenges of deploying OOP in a company’s software
39.
It is important to undertake the integration stage for OOP projects. Explain the significance of this stage
40.
Write a C++ program that uses a constructor to create two instances of a class named triangle. The instances should be initialized as inst1(20,10), inst2(16,12) where the 1st and 2nd values represent the base and height respectively. The class should also contain a member for determining and outputting the area of the triangle