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

Lab 1 Introduction To Object Oriented Software Engineering and Object Orientation in Uml

This document introduces object-oriented software engineering and development. It discusses key concepts like abstraction, encapsulation, inheritance and polymorphism. The software development lifecycle in OO includes requirements elicitation, analysis, design, implementation, testing and maintenance. During analysis and design, developers create models of the system including functional, object and dynamic models. The Unified Modeling Language (UML) is then used to visualize these models using diagrams like class, sequence and state diagrams.

Uploaded by

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

Lab 1 Introduction To Object Oriented Software Engineering and Object Orientation in Uml

This document introduces object-oriented software engineering and development. It discusses key concepts like abstraction, encapsulation, inheritance and polymorphism. The software development lifecycle in OO includes requirements elicitation, analysis, design, implementation, testing and maintenance. During analysis and design, developers create models of the system including functional, object and dynamic models. The Unified Modeling Language (UML) is then used to visualize these models using diagrams like class, sequence and state diagrams.

Uploaded by

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

Lab 1

INTRODUCTION TO OBJECT ORIENTED SOFTWARE ENGINEERING


AND OBJECT ORIENTATION IN UML

Learning objective:
After this lab student should be able to:
 What is object oriented software engineering?
 Review of object oriented programming.
 Understanding of system models.
 Understanding Object Oriented Analysis and Design (OOAD).
 Software Development activities in OO.
 Artefacts of OBJECT-ORIENTED software development.

What is object oriented software engineering?


Object-Oriented Software Engineering (OOSE) is a software design technique that is used in
software design in object-oriented programming.
It is a methodology for engineering a software solution based on the principles of object-
orientation; where real-world entities are represented as objects in the solution system. OBJECT-
ORIENTED SOFTWARE DEVELOPMENT uses the object-oriented concepts of abstraction,
encapsulation, inheritance and polymorphism to model (analyse and design) a software solution
which is then implemented in an object-oriented programming language (such as Java, C# etc).
This allows the solution software to achieve reusability, extensibility and flexibility goals of
software engineering. Thus, object-oriented software development is the object-oriented way of
constructing software.

1
Principles of Object orientation
When modelling a solution in object-oriented software development, principles of object
orientation form the foundation of the constructed system, therefore it is important to understand
them.
1. Abstraction
Abstraction means a representation of a real-world entity, thing or a concept as an Object.
It focuses on ignoring irrelevant features, properties, or functions of the real-world object
and emphasizing the ones relevant to the scope of the problem. For example: A Student
class in a university’s course registration system represents a real-world student at a
university. This student may have grandparents, but for a course registration system, this
information about the student is irrelevant. Only his/her name, registration number and
semester details are relevant. Hence only relevant details are kept when modelling the
system.

2. Polymorphism
Polymorphism is the phenomenon of an something existing in more than one form. It
ensures that the appropriate method is called for an object of a specific type when the
object is disguised as a more general type.

3. Inheritance
A class can extend another class, inheriting all its data members and methods while
redefining some of them and/or adding its own. Inheritance represents is a relationship
between data types. For example: a Circle is a Shape. A Software Engineering Student is
a Student.

2
4. Encapsulation
Encapsulation means that all relevant information and behavior of a real world object are
enclosed as a class/object and is also hidden from the other objects to protect it from
unauthorized access (such as private attributes and functions of a class). Other classes
interacts with this class only through its interface (i.e. constructors and public methods).
Software Lifecycle in OO development
The activities associated with software development are:

Fig 2: Software Development Life cycle Phases

3
1. Requirements Elicitation: During requirements elicitation, the client and developers
define the purpose of the system. The result of this activity is a description of the system
in terms of actors and use cases. Non-functional requirements are also elicited.
2. Analysis: During analysis, developers aim to produce a model of the system that is
correct, complete, consistent, and unambiguous. Developers transform the use cases
produced during requirements elicitation into an object model that completely describes
the system.
3. Design:
System design: During system design, developers define the design goals of the project
and decompose the system into smaller subsystems that can be realized by individual
teams. The result of system design is a clear a subsystem decomposition and a
deployment diagram representing the hardware/software mapping of the system.
Object Design: During object design, developers define solution domain objects to
bridge the gap between the analysis model and the hardware/software platform defined
during system design.

4. Implementation: During implementation, developers translate the solution domain


model into source code. This includes implementing the attributes and methods of each
object and integrating all the objects such that they function as a single system.

5. Testing: During testing, developers find differences between the system and its models
by executing the system (or parts of it) with sample input data sets. During system
testing, typical and exception cases are run through the system and compared with the
requirements model. The goal of testing is to discover as many faults as possible such
that they can be repaired before the delivery of the system.

6. Maintenance: The maintenance phase of the SDLC occurs after the product is in full
operation. Maintenance of software can include software upgrades, repairs, and fixes of
the software if it breaks.

Work Product or Artefacts: Each of these software development activities generates an


artifact, such as an analysis document or a piece of code for other developers or for the client,
these artefacts are called work products.

Modelling a System in object-oriented software development: System development in object-


oriented software development focuses on three different models of the system.
 System Model
 Task Model
 Issue Model
Models are used to represent real word concepts or systems in a notational form thus is done for
understanding the system we want to build and for documenting the system.
System Model: System Model is basically used to analyze and design the system itself.
Task Model: Task Model includes the project management aspect for the developed system.

4
Issue Model: Issue Model covers the important change management aspects.

Fig 3:Model Diagrams


Object Oriented Analysis and Design (OOAD): Analysis and Design activities attempt to build
a system model that describes the application domain and object-oriented software development
aims to construct the system into objects. Thus, OOAD aims at identifying objects and classes
the system can be composed of, their associated behaviours and identifies the roles
(internal/external) that will interact with this behaviour when the system is fully operational. So
OOAD is effectively the modelling documentation that you have to generate before you embark
on fully implementing a long and potentially expensive software project. Analysis takes place
after (or during) requirements specification and design comes after (or along with it). During
OOAD the System Model is developed, aimed at helping the analyst and designer to understand
a system from three different aspects (each represented by a different type of system model):

a. The Functional Model describes the functionality of the system from the user’s point of
view. “What the system is supposed to do?” and “Who uses which behaviour of the
system?” – These questions are answered through model.
b. The Object Model describes the structure of the system in terms of objects, attributes,
associations, and operations. Answers questions of “What classes/objects is the system
divided into?” and “How are these classes inter-related?”
c. The Dynamic Model describes the internal behaviour of the system in reaction to an
external trigger. This model helps answer the following questions about the system under
construction: “What is the sequence of functionality executed by the system?” and “How
does an object behave when its function is called by some external trigger?”

5
Unified Modelling Language: The Unified Modelling Language (UML) is a general-purpose,
developmental, modelling language in the field of software engineering that is intended to
provide a standard way to visualize the design of a system, including elements such as: any
activities (jobs); individual components of the system; and how they can interact with other
software components; how the system will run; how entities interact with others (components
and interfaces); external user interface. UML is originally intended for object-oriented design
documentation, however now it has been extended to a larger set of design documentation and
been found useful in many contexts. UML is a tool for modelling an Object-Oriented system.
UML has many types of diagrams, which are divided into two categories:

a. Static (or structural) diagrams emphasize the static structure of the system using
objects, attributes, operations and relationships. It includes class diagrams and composite
structure diagrams.
b. Dynamic (or behavioural) diagrams emphasize the dynamic behaviour of the system
by showing collaborations among objects and changes to the internal states of objects.
This view includes sequence diagrams, activity diagrams and state machine diagrams.
Some types represent structural information, and the rest represent general types of
behaviour, including a few that represent different aspects of interactions. These
diagrams can be categorized hierarchically as shown in the following class diagram.

6
Unified Modeling Language (UML):

Unified Modeling Language (UML) is a general-purpose, developmental, modeling language in


the field of software engineering that is intended to provide a standard way to visualize the
design of a system.

a) UML Notations Each UML diagram consists of symbols (which depict a concept),
directed lines or arcs (which depict relationships between concepts), and labels for these
symbols and lines (depicting their name or nature). Following example shows is the UMl
notations diagrams.

b) UML Versions: UML has been evolving since the second half of the 1990s and has its
roots in the object-oriented programming methods. UML started from version 1.0 and
has reached 2.5 currently. Each version supports a variation of symbols and
diagramming elements.
c) UML Tools: Many professional UML tools are available on the internet (for free and/or
paid) that let you draw UML diagrams with ease. This course will use Microsoft Visio as
the standard UML tool for modelling.

Object Oriented Analysis and Design using UML Diagrams: UML diagrams are used to
understand and elicit system requirements and helps in providing a visual picture of the
system to be constructed. Therefore, Analysis and even design heavily involves diagramming
using UML. However, it is important to distinguish that a diagram is a partial graphic
representation of a system's model. The set of diagrams need not completely cover the
system model and deleting a diagram does not change the model. The model may also

7
contain documentation that drives the model elements and diagrams (such as written use
cases). The following diagrams are associated with the given system models:

Functional model: Use Case Diagram


Object Model: Class Diagram and Object Diagram
Dynamic Model: Sequence Diagram, Interaction diagram, State Machine Diagram, Activity
Diagram.

8
Lab Task: [Total Marks = 10]

Note: You may browse online to answer the following questions. But you must write references

Lab Task 1.1 [4]


What is the difference Abstraction and Encapsulation principles of object orientation?

Lab Task 1.2 [2]


Which UML diagram corresponds to Functional model of a system?

Lab Task 1.3 [4]


Explore online UML tools and mentions the name and website address of at least 4 of them:

Lab Task 1.4 [4]


What is object oriented software engineering?:

Lab Instructor:

Qazi Shuja ud Din (Riphah International University)


Email: [email protected]

You might also like