Get premium membership and access revision papers, questions with answers as well as video lessons.
Got a question or eager to learn? Discover limitless learning on WhatsApp now - Start Now!

Object Oriented Programming I Question Paper

Object Oriented Programming I 

Course:Bachelor Of Science In Information Technology

Institution: Kca University question papers

Exam Year:2011



UNIVERSITY EXAMINATIONS: 2010/2011
SECOND YEAR EXAMINATION FOR THE DEGREE OF BACHELOR OF
SCIENCE IN INFORMATION TECHNOLOGY
BIT 2108: OBJECT ORIENTED PROGRAMMING I
DATE: AUGUST 2011 TIME: 2 HOURS
INSTRUCTIONS: Answer question ONE and any other TWO questions
Question One
a) Application development has increasingly become complex to develop than it was years ago. Give
FOUR reasons why you think this is so (4 Marks)
b) Give three characteristics of an object (3 Marks)
c) Give four benefits of object technology (4 Marks)
d) Explain the following component
i. Object Oriented Analysis
ii. Object Oriented Design
iii.Object Oriented Programming (6 Marks)
e) With examples spell out two differences between Object Based Programming and Object Oriented
Programming Languages (4 Marks)
f) Give three application area of oriented application (3 Marks)
g) Explain with examples how pointers can be used for memory allocation (3 Marks)
h) Explain the structure of a C++ program and show how the concept of Client Server concept is
achieved (3 Marks)
2
Question Two
b) Describe the following terms as used in OOP
i) Static memory allocation
ii) Dynamic memory allocation
iii) Constructors
iv) Destructors (8 Marks)
3
c) Write a program that displays an invoice of several items. It should contain the item name,
quantity, price, and total cost on each line for the quantity and item cost. It also contains
methods to get and set item name, quantity, and price. Objects are created in main and invoices
printed. (8 Marks)
Question three
a) Write a program that calculates and displays the weekly salary for an employee who earns $25 an
hour, works 40 regular hours, 13 overtime hours, and earns time and one-half (wage * 1.5) for
overtime hours worked. Create a separate method to do the calculation and return the result to be
displayed. Your program contain a class that holds the employee details indicated as well as the
method to do the computation (8 Marks)
b) Define the following
i) Method
ii)Inheritance
iii) Class (6 Marks)
c) Create a class named Box that includes integer data fields for length, width, and height. Create
three constructors that require one, two, and three arguments, respectively. When one argument is
used, assign it to length, assign zeros to height and width, and print “Line created”. When two
arguments are used, assign them to length and width, assign zero to height, and print “Rectangle
created”. When three arguments are used, assign them to the three variables and print “Box
created”. (6 Marks)
Question Four
a) With a valid example, explain how ADT are created. (3 Marks)
b) Describe how abstraction is achieved when using class object to implement systems. (3 Marks)
c) Describe code reuse as used in application development. (2 Marks)
d) Differentiate between multiple and hierarchical inheritance. (2 Marks)
e) Explain how classes achieve code hiding and code reuse in a program. Write a program to help
explain your answer. (10 Marks)
Question Five
a) Define what a friend function is and predict the output of the following program
d) Explain what you understand by the following
i) Virtual function
ii)Multiple inheritance (2 Marks)






More Question Papers


Popular Exams



Return to Question Papers