0% found this document useful (0 votes)
9 views

Ics 2104 Eit 4108 Object Oriented Programming Fundamentals of Object Oriented Programming (1)

The document is an examination paper for the Bachelor of Science in Information Technology at Mombasa Polytechnic University College, focusing on Object Oriented Programming. It includes instructions for candidates, five questions covering key concepts such as encapsulation, polymorphism, and control structures in Java, as well as practical coding tasks. The exam is intended to assess students' understanding of object-oriented programming fundamentals and their ability to implement these concepts in code.

Uploaded by

okumufelix023
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Ics 2104 Eit 4108 Object Oriented Programming Fundamentals of Object Oriented Programming (1)

The document is an examination paper for the Bachelor of Science in Information Technology at Mombasa Polytechnic University College, focusing on Object Oriented Programming. It includes instructions for candidates, five questions covering key concepts such as encapsulation, polymorphism, and control structures in Java, as well as practical coding tasks. The exam is intended to assess students' understanding of object-oriented programming fundamentals and their ability to implement these concepts in code.

Uploaded by

okumufelix023
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

THE MOMBASA POLYTECHNIC UNIVERSITY COLLEGE

(A Constituent College of JKUAT)


(A Centre of Excellence)

Faculty of Engineering &


Technology
DEPARTMENT OF COMPUTER SCIENCE & INFORMATION TECHNOLOGY

UNIVERSITY EXAMINATION FOR:


BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY
(BSIT M1/BITIT J12)

ICS 2104/EIT 4108:


OBJECT ORIENTED PROGRAMMING I
FUNDAMENTALS OF OBJECT ORIENTED PROGRAMMING

END OF SEMESTER EXAMINATION


SERIES: DECEMBER 2012
TIME: 2 HOURS
Instructions to Candidates:
You should have the following for this examination
- Answer Booklet
This paper consist of FIVE questions
Answer question ONE (COMPULSORY) and any other TWO questions
Maximum marks for each part of a question are as shown
This paper consists of TWO printed pages

Question One (Compulsory)


a) Briefly describe the following features of object-oriented programs:
(i) Encapsulation (2 marks)
(ii) Polymorphism (2 marks)
(iii) Data Abstraction (2 marks)

b) Enumerate at least THREE differences between procedural programming and object-oriented


programming. (3 marks)
c) Differentiate between the following:
(i) Base Class and Derived Class (4 marks)

© 2012 – The Mombasa Polytechnic University College Page 1


(ii) Local Variable and Global Variable (4 marks)
(iii) Prefix Operators and Postfix Operators (4 marks)

d) Write a segment of code that gets the sum of all numbers between 100 and 300 that are divisible by
5 using the:
(i) Do…..while loop (5 marks)
(ii) For…..Loop (4 marks)
Question Two
With the use of Java code fragments, implement the following features of object-oriented paradigm:
(i) Inheritance (5 marks)
(ii) Polymorphism (5 marks)
(iii) A class to hold student details and calculate student marks. (5 marks)
(iv) A statement to instantiate TWO objects of the class defined in Question 2 (iii) above and
initiate them with appropriate values. (5 marks)
Question Three
a) Using appropriate examples, describe the THREE control structure in Java programming
Language. (9 marks)

b) There are TWO major types of Java Programs. List the TWO types and explain how they differ
from one another. (6 marks)

c) Explain the main differences between the do…while statement and the while….statement.
(5 marks)
Question Four
Write a program that uses a class employee to display an employee’s information. The class should
include the following members:
Data numbers (Employee number, Employee name, basic salary, house allowance, medical allowance,
income tax)
Member functions (to read values, to calculate gross salary, to display values) (20 marks)
Question Five
a) Define the following:
(i) Constructor (3 marks)
(ii) Method (3 marks)

b) Write a program that uses a class named circle to accept the radius of a circle and compute both the
area and circumference (area = pi* radius* radius, circumference = Pi* diameter)
(14 marks)

© 2012 – The Mombasa Polytechnic University College Page 2

You might also like