Professional Documents
Culture Documents
HBT 2305 Object Oriented Analysis and Design
HBT 2305 Object Oriented Analysis and Design
QUESTION ONE
d. List any explain the two types of functional requirements identified by use
case analysis. (6 marks)
1
e. Explain the following OOAD concepts:-
i. Abstraction. (2 marks)
QUESTION TWO
“An airline company has employees. A team builds an airplane which has a
number of components. An airplane lands and takes off from an airstrip in
an airport. The airplane carries passengers from a source to destination. An
airplane is managed by a captain and co-pilot alone with his cabin crew
consisting of airhostess and attendants. (10 marks)
QUESTION THREE
Seats can be reserved by customers on the web sit of the bus company. The
customer has the option to directly pay for the seat through the web sit. In that
case, the seat can not be cancelled (neither by the customer nor by the bus
company). If the customer has not paid for the seat, the bus company can cancel
the seat if the customer does not show up one hour before the trip. When the
reservation is cancelled, the seat will be came free and can be sold to another
customer. Both the customer and the company staff must authenticate themselves
for performing operations with the system.
a. Draw a use case diagram for describing the functional requirements of the
above system. (10 marks)
2
c. Explain the following relationships among use cases. (4 marks)
i. Extend
ii. Include
QUESTION FOUR
To give an exam, an instructor first notifies the students of the exam date and the
content to be covered. He then prepares the exam paper with sample solutions,
get it copied to produce enough copies for the class, and hands it out to students
on the designated time and location. The students write their answers to exam
questions and hand in their papers to the instructor. The instructor then gives the
exam papers to the TAS, along with sample solutions to each questions, and gets
them to mark it. He then records and returns the papers to the students.
Required:-
d. UML models are used in both analysis and design phases of software
development. What is the aim of each of the two phases. (4 marks)
f. Draw a deployment diagram that depicts a web based app that will be used
by patient to book, pay and cancel doctor’s appointments. (4 marks)
Question One:
a. UML diagrams used for: i. Modeling requirements: Use Case Diagrams ii.
Modeling work flows: Activity Diagrams iii. Modeling
behavior of an object: State Diagrams iv. Interaction
between groups of objects: Sequence Diagrams
b. i. Difference between object and structured approach:
3
Object-Oriented Approach (OOAD): Focuses on modeling real-world
entities as objects and their interactions. It promotes encapsulation,
inheritance, and polymorphism.
Structured Approach: Focuses on decomposing a system into smaller
functional modules or components and emphasizes procedural design.
ii. Advantages of OOAD over traditional approach:
1. Reusability: Objects and classes can be reused across different projects.
2. Modularity: Encapsulation leads to well-defined and modular components.
3. Flexibility: Inheritance and polymorphism allow for more adaptable and
extensible designs.
4. Modeling Real-world: OOAD closely resembles real-world entities and
their relationships.
iii. Importance of modeling in system analysis: Modeling helps in:
Understanding the system's requirements and behavior.
Visualizing complex structures and processes.
Communicating effectively with stakeholders.
Identifying potential issues early in the design phase.
c. Distinguishing class notation and object notation in UML:
Class Notation: Represents the structure and attributes of a class using a
rectangular box divided into three compartments (name, attributes,
methods).
Object Notation: Represents an instance of a class in a diagram. It is
shown as the name of the object followed by a colon and the class name.
d. Functional requirements identified by use case analysis:
1. Primary (Main) Functional Requirements: These are essential functions
that the system must perform to achieve its main goals.
2. Secondary (Supporting) Functional Requirements: These are additional
functions that enhance the system's usability, performance, or user
experience.
e. Explain OOAD concepts: i. Abstraction: Focuses on the essential aspects of
an object while ignoring irrelevant details. It simplifies
complex reality by modeling classes and their
interactions. ii. Encapsulation: Bundles data (attributes)
and the methods (functions) that operate on the data into
a single unit (class), ensuring data integrity and hiding
implementation details. iii. Polymorphism: Allows
objects of different classes to be treated as objects of a
common superclass through inheritance. Enables
methods to be overridden in subclasses, providing
flexibility in behavior.
Question Two:
a. Different relationships between classes in UML modeling:
1. Association: A generic relationship representing a connection between
classes.
2. Aggregation: A "whole-part" relationship, where one class (whole)
contains or is composed of other classes (parts).
4
3. Composition: A stronger form of aggregation where the lifecycle of parts
is controlled by the whole.
4. Inheritance (Generalization): Represents an "is-a" relationship, where one
class inherits attributes and behaviors from another.
5. Dependency: A relationship where changes in one class can affect another
class.
b. Relationships between classes in the given statement:
Airline Company has Employees (Association)
Team builds Airplane (Association)
Airplane consists of Components (Aggregation)
Airplane uses Airstrip (Dependency)
Airplane is managed by Captain and Co-Pilot (Association)
Airplane's Cabin Crew consists of Airhostess and Attendants (Aggregation)
Airplane lands and takes off from Airstrip (Association)
Airplane carries Passengers (Association)
c. State diagram for CPU states:
[Diagram depicting CPU states]
Question Three:
a. Use case diagram for reservation system:
[Diagram depicting use case relationships]
b. Non-functional requirements:
1. Security: Ensuring the authentication and authorization of both customers
and company staff for system operations.
2. Performance: The system should handle high traffic and process payments
efficiently.
3. Reliability: The system should have a high uptime and should be able to
handle seat cancellations and reassignments without errors.
c. Relationships among use cases: i. Extend: Allows optional behavior to be
added to a use case. The extended use case is optional
and depends on certain conditions. ii. Include:
Encapsulates common behavior that is shared by
multiple use cases. The included use case is essential
and is always invoked by the base use case.
Question Four:
a. Generalization and Aggregation in UML:
Generalization: Represents an "is-a" relationship between a superclass and
one or more subclasses. It implies inheritance and code reuse.
Aggregation: Represents a whole-part relationship, where a class (whole)
contains or is composed of other classes (parts). It signifies a weaker
relationship than composition.
b. Aggregation notation:
[Diagram depicting aggregation relationship]
c. "A method implements the behavior of an object" justification: A method
in an object's class defines the actions that the object can
perform. By invoking methods, the object expresses its
behavior and interacts with other objects and the system.
Methods encapsulate the logic that allows the object to
5
respond to messages and perform tasks, thus
representing the behavior of the object.
d. Aim of analysis and design phases in software development:
Analysis Phase: Aims to understand and define the problem domain, gather
requirements, and create a conceptual model of the system.
Design Phase: Aims to create detailed technical specifications, define
system architecture, and plan the implementation approach.
e. Use of deployment diagram in UML modeling: A deployment diagram
visualizes how software components are deployed onto
hardware nodes (e.g., servers, machines). It shows the
physical distribution of components across different
nodes, helping to understand the system's deployment
topology.
f. Deployment diagram for web-based app:
[Diagram depicting deployment of web-based app]
Remember that my response may not contain exact diagrams due to the text-based
format, but I've tried to describe the concepts as
accurately as possible.