Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
23 views
4 pages
OOP 2017july
revision material ict
Uploaded by
Charles Bryton
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save OOP 2017july For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
23 views
4 pages
OOP 2017july
revision material ict
Uploaded by
Charles Bryton
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save OOP 2017july For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save OOP 2017july For Later
You are on page 1
/ 4
Search
Fullscreen
easytvet.com 2920/203 OBJECT ORIENTED PROGRAMMING July 2017 Time: 3 hours THE KENYA NATIONAL EXAMINATIONS COUNCIL DIPLOMA IN INFORMATION TECHNOLOGY MODULE II OBJECT ORIENTED PROGRAMMING 3 hours INSTRUCTIONS TO CANDIDAT You should have an answer booklet for this examination: This paper consists of EIGHT questions. Answer any FIVE in the answer hooklet provided. All questions carry equal marks. Candidates should answer the questions in English. This paper consists of 4 printed pages. Candidates should check the question paper to ascertain that all the Pages are printed as indicated and that no questions are missing. © 2017 The Kenya National Examinations Council Turn over(b) we Wd) 3. fa) (bd) 4) 2920203 Saks 20> easytvet.com (i) Outline four charaeteristies of abstract data types (ADS). (4 marks) Gi) Explain the term message as used in OOP. (2 marks) With the aid of a C++ example in cach case. differentiate between a variable and a constant. (4 marks) Describe two circumstances under which the do. while fonp is most applicable in OOP. (4 marks) Write a C++ program that implements a class named msedass with the Following Features: (6 marks) Data members d and by; ‘A member function named se¢/ to assign characters “O" and ‘P* to a and respectively, and outputs a concatenation of w and 6. Explain the purpose of using the namespace std in C++ programs (2 marks) @ inguish between strucé and class data structures as used in C+ +, marks) Gi) Outline four categories of operators used in C+ giving an example in exch ease. (4 marks) Draw 2 program flowchart to show the execution logie of a while loop structure. (4 marks) Write x C1+ program that would implement a class with the dimensions of a cylinder as data members. The program should then accept the dimensions, determine and display the volume of the cylinder using a Iriend function. (G marks) Ouiline four typical features of object oriented programming that makes it popular in application development. (4 marks) (i) Explain two aims of object oriented analysis and design (OOD). (4 marks) (i) Differentiate between accessor operation and setter operation as used in OOP. {4 marks) Design two classes with relevant data and methods that can be used to manage the following communication model in a college. (8 marks) The Whaasup group directory of a college contains entries for each person in the college ice, student, tutor, and staff member. Users of the directory ean look up names, set phone number and chat. However. the administrator of the directory can, atter supplying a password, insert new entries, delete existing entries, modify existing entries, print the telephone directory, and print a listing of all students or of all members of stall. Explain the folowing terms as used in OOP: a) instantiation; {2 marks) Gi) access specitier. (2 marks) 2easytvet.com (b) Describe the circumstance under whieh cack of the following C+* program elements are most applicuble: (Scope resolution operator: (2 maths Gi) Object parameter (2 marks) ©) Write a C+» program segment to demonstrate the use of Mis pointer ina constructor. nat ‘e! (4 marks) (@)— (i) Outline one advantage and one disadvantage of using overloaded fanetions in oop. (2 marks) (ii) Write a C++ program that will accept the dimensions of « cuboid and use an overloaded function called calculate to determine the eross-sectional area or volume of the cuboid. Display the area and volume accordingly. (6 marks) 5. (a) Outtine four rules of setting destructons in OOP. (4 marks) (>) (Explain two ways in which copy constructors are used in C++ programs. (4 marks) (i) Distinguish between sex file and data file as applied in C++ programs. (4 marks) (©) Write a C++ program that will initialize bvo objects, Obl (7, 8) and-Ob2 (2, 5), using a construetor. The program should then determine the dilerenee of the objects using an overloaded operator und display the values of resultant object. (8 marks) 6 (2) @)_List four operators that cannot be overloaded (2 marks) (ii) Outline two restrictions that must be considered when overloading operators in oop. (2 marks) (>) (Explain two benefits of using files in OO programs. (4 marks) (8) Distinguish between a sireant and a template class with respect to C4+ files, (4 marks) {c) Evaluate the following C+ statement clearly showing your working, 4 93132115 %T~2€1215*2-9/3 (2 marks) {d) Figure 1 shows the relationship between two classes, Write a €! + program to implement the relationship and output a. b and sum of all the data members. (6 marks) Data: a Methods: set a to 100; IY derives Data: b Methods: set b to 237; Figure 1 2920/203 3 Turn over duly 20777 @ ) © (b) {e) 2920/203 sfuly 2077 easytvet.com Explain the following terms as in inheritance: L override; (2 marks) I. variance. Q marks) Gi) Deseribe the circumstance under which a virtual base class is applicable in OOP. (2 marks) @ 's can be implemented using different open modes based on theit purpose Assuming C++ programming language, outline four values of the openmodes. 4 marks) (ii) Write a C++ program segment that would open a marks database file for reading, aficr verifying that it is open, and outputs the contents to the screen. Note that the file contains examination marks only. (4 marks) With the aid of an example in each case, explain three types of polymorphism applicable in OOP. (6 marks) (Write the C++ general syntax for a polymorphic class. G marks) Gi) Differentiate between abstract hase class and normal base class as used in OOP. (4 marks) (Sharing is the basic idea of inheritance. Justify this statement with respect to oop. G marks) (ii) A student intends to solve a programing problem using a constructor and a destructor in both the base and derived classes. With the aid of a C++ program segment, demonstrate the process of creating and deleting the respective objects. (6 marks) A software development company has adopted OOP in its current projects. Explain ‘two ways in which the company would use to cope with the emerging trends in OOP. (4 marks) THIS IS THE LAST PRINTED PAGE.
You might also like
OOP Using C++ Major Exam 2013
PDF
No ratings yet
OOP Using C++ Major Exam 2013
4 pages
Object Oriented Programming
PDF
No ratings yet
Object Oriented Programming
2 pages
Oops 1
PDF
No ratings yet
Oops 1
20 pages
Object Oriented Programing Dec 2010,2013,2016
PDF
No ratings yet
Object Oriented Programing Dec 2010,2013,2016
40 pages
2021 N
PDF
No ratings yet
2021 N
4 pages
Object Oriented Programming Using C++
PDF
No ratings yet
Object Oriented Programming Using C++
6 pages
CSL0203 - OOP-Paradigm With C
PDF
No ratings yet
CSL0203 - OOP-Paradigm With C
5 pages
NR 220504 Object Oriented Programming
PDF
No ratings yet
NR 220504 Object Oriented Programming
8 pages
OOP in C++
PDF
No ratings yet
OOP in C++
25 pages
Question Paper 2021 Introduction To Object Oriented Programming
PDF
No ratings yet
Question Paper 2021 Introduction To Object Oriented Programming
4 pages
WWW Manaresults Co in
PDF
No ratings yet
WWW Manaresults Co in
4 pages
Object Oriented Programming Using C++
PDF
No ratings yet
Object Oriented Programming Using C++
2 pages
End Term Examination April 2024 OE (OOP)
PDF
No ratings yet
End Term Examination April 2024 OE (OOP)
1 page
Sample Question Paper: Employee Employee Name, Employee ID Getdata, Putdata
PDF
No ratings yet
Sample Question Paper: Employee Employee Name, Employee ID Getdata, Putdata
7 pages
CMT 211 PT
PDF
No ratings yet
CMT 211 PT
3 pages
BIT 123 Object Oriented Programming MS
PDF
No ratings yet
BIT 123 Object Oriented Programming MS
18 pages
Object Oriented Programming Using C++
PDF
No ratings yet
Object Oriented Programming Using C++
5 pages
Ics 2104 Object Oriented Programming I
PDF
No ratings yet
Ics 2104 Object Oriented Programming I
3 pages
VTU-14-01-2019 01:41:02pm: TG - TG - TG - TG - TG - TG - TG - TG - TG
PDF
No ratings yet
VTU-14-01-2019 01:41:02pm: TG - TG - TG - TG - TG - TG - TG - TG - TG
2 pages
Mid Semester Exams C++ September 2023
PDF
No ratings yet
Mid Semester Exams C++ September 2023
3 pages
OOP With C++
PDF
No ratings yet
OOP With C++
8 pages
Null 1
PDF
No ratings yet
Null 1
4 pages
ICS 2104 Object Oriented Programming I
PDF
No ratings yet
ICS 2104 Object Oriented Programming I
2 pages
Untitled
PDF
No ratings yet
Untitled
9 pages
Oops Tma
PDF
No ratings yet
Oops Tma
4 pages
C++ QP
PDF
No ratings yet
C++ QP
7 pages
Sy Sem III 22316 QP Model Answers Oop
PDF
No ratings yet
Sy Sem III 22316 QP Model Answers Oop
78 pages
3134 Oct 20
PDF
No ratings yet
3134 Oct 20
2 pages
Question Paper - Oop
PDF
No ratings yet
Question Paper - Oop
13 pages
Dot NET Exam Analysis
PDF
No ratings yet
Dot NET Exam Analysis
6 pages
Ics 2104 Object Oriented Programming I
PDF
No ratings yet
Ics 2104 Object Oriented Programming I
3 pages
Object Oriented Programming (CM - IF)
PDF
No ratings yet
Object Oriented Programming (CM - IF)
6 pages
Dit-Sep-2022-Object Oriented Programming
PDF
No ratings yet
Dit-Sep-2022-Object Oriented Programming
5 pages
29-4-21 SCS 202-Object Oriented Programming-1
PDF
No ratings yet
29-4-21 SCS 202-Object Oriented Programming-1
3 pages
Object Oriented Programming Through C++ Feb 2022
PDF
No ratings yet
Object Oriented Programming Through C++ Feb 2022
2 pages
OOP-Paradigm With C++
PDF
No ratings yet
OOP-Paradigm With C++
5 pages
C++ Papers
PDF
No ratings yet
C++ Papers
9 pages
2017 July
PDF
No ratings yet
2017 July
5 pages
Object Oriented Programming in C++
PDF
No ratings yet
Object Oriented Programming in C++
18 pages
Cit 3153 Object Oriented Programming I
PDF
No ratings yet
Cit 3153 Object Oriented Programming I
3 pages
Past Question CPP
PDF
No ratings yet
Past Question CPP
25 pages
C++ Uq
PDF
No ratings yet
C++ Uq
37 pages
Cit 108
PDF
No ratings yet
Cit 108
3 pages
C++ Questions
PDF
No ratings yet
C++ Questions
3 pages
Instructions: Question One TWO
PDF
No ratings yet
Instructions: Question One TWO
2 pages
Bca 2 Sem Programming in CPP Winter 2018
PDF
No ratings yet
Bca 2 Sem Programming in CPP Winter 2018
2 pages
Oops Pyqp
PDF
No ratings yet
Oops Pyqp
8 pages
Object Oriented Programing0001
PDF
No ratings yet
Object Oriented Programing0001
4 pages
Cit 3153 Object Oriented Programming I
PDF
No ratings yet
Cit 3153 Object Oriented Programming I
4 pages
Oop Merged
PDF
No ratings yet
Oop Merged
12 pages
SCS 202 24..25
PDF
No ratings yet
SCS 202 24..25
3 pages
SCS 202 22
PDF
No ratings yet
SCS 202 22
3 pages
Oops Pyq
PDF
No ratings yet
Oops Pyq
11 pages
C++ Pro QP
PDF
No ratings yet
C++ Pro QP
8 pages
2018 Nov
PDF
No ratings yet
2018 Nov
8 pages
2022 External Paper
PDF
No ratings yet
2022 External Paper
2 pages