Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Department of Computer Science

Federal University of Lafia


First Semester Examination 2019/2020 Date: Wednesday, 19th May 2021
CSC312: Object Oriented Programming Credit Units: 3 Duration: 2 Hrs.
Instruction: Answer four (4) questions in all. Two (2) from each section.

Section A
Question 1:
a) What are the conditions that determine if a given programming language is object-oriented or not?
[3 Marks]
b) Define an object in terms of its composition and integrity. [3 marks]
c) Write briefly on the two sweeping trends that were historically responsible for the evolution of the object
model. [3 marks]
d) In transitioning from algorithmic decomposition to OO decomposition, subprograms emerged as abstraction
mechanism rather than ordinary labour-saving devices. Explain the three key consequences of this
development in the 1960s. [3 marks]
e) Write briefly on the trio concepts of:
Object Oriented Analysis  Object Oriented Design  Object Oriented Implementation. [3 marks]

Question 2:
a) What do you understand by the twin principle of least commitment and that of least astonishment as
applicable to abstraction? [3 marks]
b) Enumerate any four spectrum of abstraction you know. [2 marks]
c) Justify the essence of separation of concerns. [2 marks]
d) On a given project, over time, what are the three levels of maturity in which the system design could
evolve? [3 marks]
e) Explain any one of the three minor elements of the object model. [2 marks]
f) In applying the object model, five benefits are eminent. Identify any three (3) of them. [3 marks]

Question 3:
a) Design patterns are categorized into three. List them and give four examples of patterns in each. [4½ marks]

b) What is a design pattern and how would you as a developer benefit from using one? [3 marks]

c) In each category of design patterns, describe any one example of a pattern, specifying the nature of the
problem it addresses, its solution and how it can be adopted to real-world scenarios. [7½ marks]
Section B
Use the case study below to answer Questions 5.a and 6.a.
Question 4 :
a) Object oriented design rests upon three (3) principles. State and explain these principles.
[4½ Marks]
b) State and explain the three (3) prominent parts of a system’s model. [4½ marks]
c) Using suitable examples and diagrams, explain the following key features of object-oriented programming.
i). Inheritance ii). composition iii). aggregation. [6 marks]

Case Study: Ekokol Hotel


A computer system is required by Ekokol Hotel to assist the management of the hotel to manage the reservation
of facilities like rooms and presentation equipment. The Ekokol Hotel has rooms which includes 5 function
rooms and several bedrooms. The bedrooms are made up of 20 single bedrooms and 40 double bedrooms. Each
room is identified by a unique room number. The function rooms have different sizes, but have the same tariff.
The hotel at the moment accepts booking requests for bedrooms or function rooms only. When customers
arrive at the hotel, the receptionist books them into the first available room of the requested type. If requested
room type is not available, the receptionist has to reject the room booking request. If a room is available on
request, the customer’s name is recorded, along with the payee (i.e. the person paying for the room). This is
recorded as ‘private’ if the customer is the payee, or the name of a company or organization may be entered.
The tariffs are $40 for a single bedroom, $55 for a double bedroom, and $200 for a function room. There is a set
of presentation equipment in the hotel which may be moved between function rooms if necessary. The
equipment is known with their names and descriptions. The hotel also ensures that a room is made available for
further bookings as soon as it is vacated. In order to improve the business, the hotel requires an information
system that supports room reservation or bookings, and stores the information for later access.

Question 5 :
a) Using the Ekokol Hotel case study information supplied above, draw a class diagram for the system that
contains the following;
i. At least 9 Classes.
ii. Attributes of the classes with visibility, data types and possible methods.
iii. Relationships (associations, aggregations, generalizations) between classes.
[11½ marks]
b) Explain the relationships between the sequence diagram and other UML diagrams in the use case- driven
process of system development? [3½ marks]

Question 6 :
a) Using the Ekokol Hotel case study information supplied above, draw the use case diagram for the system
that contains the following;
i. At least 9 use cases
ii. Actors
iii. Relationships between the actors and the use cases, and the relationships between the use
cases.
[11½ marks]
b) Explain the impact of the use case diagram on other diagrams. [3½ marks]

Page 2 of 2

You might also like