0% found this document useful (0 votes)
9 views22 pages

Chapter 5 Oop Final

Uploaded by

murtessaahmed9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views22 pages

Chapter 5 Oop Final

Uploaded by

murtessaahmed9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Chapter 5:

Introduction to Object-Oriented Software Development


& UML

BY
Mujahid Jemal (MSc)
Lecturer at Department of Electrical &Electronics Technology
and ATTC Registrar
e-mail : [email protected]

09-Aug-23 1
Outline
 Object-Oriented Design Methodologies

 Unified Modeling Language

 Role of UML in OO modeling and design

 OO concepts in UML & Types of UML diagrams

09-Aug-23 2
Object-Oriented Design Methodologies
 The general cycle that a programmer goes through to solve a
programming problem:
 Formulate the problem - The programmer must
completely understand the problem.
 Analyze the problem - The programmer must find the
important concepts of the problem.
 Design - The programmer must design a solution based on
the analysis.
 Code - Finally the programmer writes the code to
implement the design.
• The Waterfall Model, as illustrated in Fig. below, is a linear
sequential model that begins with definition and ends with
system operation and maintenance.

09-Aug-23 3
09-Aug-23 4
 The seven phases in the process as shown in Fig.above are:
i.Requirements Definition:
 The customer must define the requirements to allow the
developer to understand what is required of the software
system.
 If this development is part of a larger system, then other
development teams must communicate to develop system
interfaces.

09-Aug-23 5
ii. Analysis:

 The requirements must be analyzed to form the initial


software system model.

iii. Design:

 The design stage involves the detailed definition of inputs,


outputs and processing required of the components of the
software system model.

09-Aug-23 6
iv. Coding:
 The design is now coded, requiring quality assurance of
inspection, unit testing and integration testing.
v. System Tests:
 Once the coding phase is complete, system tests are performed
to locate as many software errors as possible.
 This is carried out by developer before the software is passed
to the client.
 The client may carry out further tests, or carry out joint tests
with the developer.

09-Aug-23 7
vi. Installation and Conversion:
 The software system is installed.

 As part of a larger system, it may be an upgrade; in which


case, further testing may be required to ensure that the
conversion to the upgrade does not affect the regular corporate
activity.

09-Aug-23 8
vii. Operation and Maintenance:
 Software operation begins once it is installed on the client site.

 Maintenance will be required over the life of the software system


once it is installed.

 This maintenance could be repair, to fix a fault identified by the


client, adaptive to use the current system features to fulfill new
requirements, or perfective to add new features to improve
performance and/or functionality.

09-Aug-23 9
 The Waterfall Model is a general model, where in small
projects some of the phases can be dropped.
 In large scale software development projects some of these
phases may be split into further phases.
 At the end of each phase the outcome is evaluated and if it is
approved then development can progress to the next phase.
 If the evaluation is rejected, then the last phase must be
revisited and in some cases earlier phases may need to be
examined.

09-Aug-23 10
Introduction to Unified Modeling
Language (UML)
UML:
• UML stands for Unified Modelling Language
• Unified modelling language (UML) is a standardized
modelling language enabling developers to specify, visualize,
construct and document artefacts of a software system.
• UML is an important aspect involved in object-oriented
software development.
• It uses graphic notation to create visual models of software
systems.
• UML was created by the Object Management Group (OMG)
and UML 1.0 specification draft was proposed to the OMG in
January 1997.

09-Aug-23 11
• OMG is continuously making efforts to create a truly industry
standard.
• UML is different from the other common programming
languages such as C++, Java, COBOL, etc.
• UML is a pictorial language used to make software blueprints.
• Although UML is generally used to model software systems, it
is not limited within this boundary.
• It is also used to model non-software systems as well.
For example, the process flow in a manufacturing unit, etc.

09-Aug-23 12
• UML is not a programming language but tools can be used to
generate code in various languages using UML diagrams.

• UML has a direct relation with object oriented analysis and


design.

• In general, the goal of UML can be defined as a simple


modelling mechanism to model all possible practical
systems in today’s complex environment.

09-Aug-23 13
OO concepts in UML & Types of UML
diagrams
 To understand the conceptual model of UML, first we need to
clarify what is a conceptual model? and why a conceptual
model is required?
 A conceptual model can be defined as a model which is made
of concepts and their relationships.
 A conceptual model is the first step before drawing a UML
diagram.
 It helps to understand the entities in the real world and how
they interact with each other.
 As UML describes the real-time systems, it is very important
to make a conceptual model and then proceed gradually.

09-Aug-23 14
UML Diagrams
Class diagram:
A class is a rectangle divided into three parts
i.Class name in top of box
- It is printed in bold and centered, and the first letter is capitalized.
ii. Class attributes (i.e. data members, variables)
- They are left-aligned and the first letter is lowercase.
iii. Class operations (i.e. methods)
- They are also left-aligned and the first letter is lowercase.

09-Aug-23 15
 Class attributes (= fields)
 Attributes (fields, instance variables)
 visibility name : type [count] = default value
 Visibility:
+ public
# protected
- private
~ package (default)
/ derived
Example: - balance : double = 0.00

09-Aug-23 16
 Operations / methods
 Visibility name (parameters) : return type
 Omit return type on constructors and when return type is void
 Parameter types listed as (name: type)
Example:
+ distance (p1: Point, p2: Point): double

09-Aug-23 17
09-Aug-23 18
Generalization/Inheritance
• Generalization is the relationship between a class (superclass)
and one or more variations of the class (subclasses).
• Generalization organizes classes by their similarities and their
differences, structuring the descriptions of objects.
• A superclass holds common attributes, attributes and
associations.
• The subclasses adds specific attributes, operations, and
associations.
• They inherit the features of their superclass.
• Often Generalization is called a “IS A” relationship
• Simple generalization organizes classes into a hierarchy.

09-Aug-23 19
09-Aug-23 20
Object Diagrams
• Format is
– Instance name : Class name
– Attributes = Values

09-Aug-23 21
09-Aug-23 22

You might also like