Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
OBJECT ORIENTED ANALYSIS
 Object Oriented Analysis Process, Use Case Modeling: Actor Identification, Actor
Classification, Actor Generalization, Use Cases Identification, Communication, Uses/Include
and Extend Associations, Writing a Formal Use Cases, Use Case realizations Domain / Class
Modeling: Approaches For Identifying Classes (Noun-Phase Approach, Common Class
Pattern Approach, Class Responsibilities Collaboration Approach, Naming Classes, Class
Associations and Identification of Associations, Generalization/Specialization Relationship,
Aggregation and Composition Relationships, Attributes and Methods Identification
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Object-oriented analysis and design
 Object-oriented programming (OOP) is a method
 based on the concept of “objects",
 which are data structures that contain data,
 in the form of fields,
 often known as attributes;
 and code, in the form of procedures,
 often known as methods
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Object-oriented analysis and design
 What is OOAD?- Object-oriented analysis and design (OOAD) is a
software engineering approach that models a system as a group of
interacting objects.
 Analysis — understanding, finding and describing concepts in the problem
domain.
 Design — understanding and defining software solution/objects that
represent the analysis concepts and will eventually be implemented in code.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Object-oriented analysis and design
 OOAD - A software development approach that emphasizes a logical
solution based on objects.
 Software development is dynamic and always undergoing major change.
 System development refers to all activities that go into producing
information system solution.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Object-oriented analysis and design
System development activities consist of
 system analysis,
 modelling,
 design,
 implementation,
 testing and maintenance.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Object-oriented analysis and design
 A software development methodology series of processes can
lead to the development of an application.
 Practices, procedures, and rules used to develop software, totally based on
system requirements
 Two Approaches
 Traditional Approach
 Objected-Oriented Approach
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Traditional Approach
 Collection of programs or functions.
 A system that is designed for performing certain actions.
 Algorithms + Data Structures = Programs.
 Software Development Models (Waterfall, Spiral, Incremental, etc..)
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Object Oriented Approach
 OO development offers a different model from the traditional software
based on functions and procedures.
 software is a collection of discrete object that encapsulate their data as
well as the functionality.
 Each object has attributes (properties) and method (procedures).
 software by building self contained modules or objects that can be easily
REPLACED, MODIFIED AND REUSED.
 Objects grouped in to classes and object are responsible for itself.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Object Oriented Approach
 OO approach is more like creating a lot of helpers
 take on an active role, a spirit, that form a community whose interactions
become the application.
 Reusable
 Modified
 Replaced
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Examples Of Object Oriented Systems
 In OO system , “everything is object”
 A spreadsheet cell, bar chart, title in bar chart, report, numbers, arrays,
records, fields, files, forms, an invoice, etc.
 A window object is responsible for things like opening, sizing, and closing
itself
 A chart object is responsible for things like maintaining data and labels
even for drawing itself.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Examples Of Object Oriented Systems
 In OO system , “everything is object”
 A spreadsheet cell, bar chart, title in bar chart, report, numbers, arrays,
records, fields, files, forms, an invoice, etc.
 A window object is responsible for things like opening, sizing, and closing
itself
 A chart object is responsible for things like maintaining data and labels
even for drawing itself.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
WHAT IS AN OBJECT?
 The term object was first formally utilized in the Simula language to
simulate some aspect of reality.
 Attributes or properties describe object‘s state (data) and methods
(properties or functions) define its behaviour.
 An object is an entity.
 It knows things (has attributes)
 It does things (provides services or has methods
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Use Case Modeling
 In use-case modeling, the system is looked upon as a black box whose
boundaries are defined by its functionality to external stimuli.
 The actual description of the use-case is usually given in plain text. A
popular notation promoted by UML is the stick figure notation
 Both visual and text representation are needed for a complete view.
 A use-case model represents the use-case view of the system
 A use-case view of a system may consist of many Use-case diagrams.
 An use-case diagram shows (the system), the actors, the use-cases and the
relationship among them.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Components of Use-case Model
The components of a Use-case model are:
System Modeled
 Actors
Use-cases
 Stimulus
System Name
name
Use-case
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
System
 As a part of the use-case modeling, the boundaries of the system are
developed.
 System in the use-case diagram is a box with the name appearing on the top.
 Define the scope of the system that you are going to design with your
EXAM. (software scope)
EXAM Software Appln.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Actors
 An actor is something or someone that interacts with the system.
 Actor communicates with the system by sending and receiving messages.
 An actor provides the stimulus to activate an Use-case.
 Message sent by an actor may result in more messages to actors and to
Use-cases.
 Actors can be ranked: primary and secondary; active and passive.
 Actor is a role not an individual instance.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Actors Identification
 Identifying actors is one of the first steps in use case analysis.
 Each type of external entities with which the system must interact is
represented by an actor
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
which has the following characteristics:
 An actor in use case modeling specifies a role played by a user or any other
system that interacts with the subject.
 An Actor models a type of role played by an entity that interacts with the
subject (e.g., by exchanging signals and data), but which is external to the
subject.
 Actors may represent roles played by human users, external hardware, or other
subjects.
 Actors do not necessarily represent specific physical entities but merely
particular facets (i.e., “roles”) of some entities that are relevant to the
specification of its associated use cases.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Finding Actors
 The actors of a system can be identified by answering a number of
questions:
 Who will use the functionality of the system?
 Who will maintain the system?
 What devices does the system need to handle?
 What other system does this system need to interact?
 Who or what has interest in the results of this system?
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Actors classification
 Actors can be people, other systems, time triggers, or event triggers.
 Primary Actor: a user whose defined user goal and is fulfilled by the system
 The primary actor of a use case is the stakeholder that calls on the system to
deliver one of its services. It has a goal with respect to the system – one that
can be satisfied by its operation. The primary actor is often, but not always,
the actor who triggers the use case.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Actors classification
 Supporting Actors: a user who provides a service (e.g., information) to the
system.
 A supporting actor (also known as a secondary actor) in a use case in an
external actor that provides a service to the system under design. It might be
a high-speed printer, a web service, or humans that have to do some
research and get back to us.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Types of actors include:
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Actors Generalization
 refers to the relationship which can exist between two actors in a use case
diagram and which shows that one actor (descendant) inherits the role and
properties of another actor (ancestor).
 The generalization relationship also implies that the descendant actor can
use all the use cases that have been defined for its ancestor.
 generalization is simply the inheritance relationship
between two actors by which one actor inherits
all the properties and relationships of another actor.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Use-cases
 A Use-case in UML is defined as a set of sequences of actions a system performs that
yield an observable result of value to a particular actor.
 Actions can involve communicating with number of actors as well as performing
calculations and work inside the system.
 A Use-case
 is always initiated by an actor.
 provides a value to an actor.
 must always be connected to at least one actor.
 must be a complete description.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
UseCase Identification
 A use case is a methodology used in system analysis to identify, clarify and
organize system requirements.
 The use case is made up of a set of possible sequences of interactions
between systems and users in a particular environment and related to a
particular goal.
 Use cases describe the functional requirements of a system from the end
user's perspective
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
UseCase Identification
 creating a goal-focused sequence of events that is easy for users and
developers to follow
 The alternate flow, also known as an extending use case, describes normal
variations to the basic flow as well as unusual situations.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
UseCase Identification
A use case should display the following characteristics:
 Organizes functional requirements.
 Models the goals of system/actor interactions.
 Records paths -- called scenarios -- from trigger events to goals.
 Describes one main flow of events and various alternate flows.
 Multi-level, so that one use case can use the functionality of another one.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
UseCase Identification
Use cases can be identified in two methods:
i. Use case identification on actor-based: method
(a) Find and specify all the actors by looking at which users will use the
system and which other systems must interact with it.
(b) For each actor, identifying the processes they initiate or participate in by
looking at how the actor communicate/interact with (or use) the system to do
his work.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
UseCase Identification
ii. Use case identification on event-based method
(a) Identify the external events that a system must respond to.
(b) Relate the events to actors and use cases.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
To represent complex relationships between different use cases, we can use the
extend and include relationships.
 Extend relationship: The use case is optional and comes after the base use
case. It is represented by a dashed arrow in the direction of the base use
case with the notation <<extend>>.
 Include relationship: The use case is mandatory and part of the base use
case. It is represented by a dashed arrow in the direction of the included use
case with the notation <<include>>.
Uses/Include and Extend Associations
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Class Modeling
 Use Static modelling is the base on which the edifice of object orientation
is built.
 A static model signifies the conceptual view of a system.
 Example college library system will definitely have concepts like book,
magazine, library attendant, librarian, student, teacher, book-issue policy,
book return policy, book procurement policy, a procedure to calculate fine
in the case a book/magazine is returned after the due date, a procedure to
determine the book//magazine to be replaced only in the reference section
and those in the take-home section and so on.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Class Modeling
 Object can be instantiated from classes
 An object has identity, data and operations to be performed on the data.
 The identity of the object is indicated by the uniqueness of its name.
 This unique name differentiates the particular object from other objects.
 The data stored within an object includes the attributes of the object.
 The operations serve as a means manipulating data stored in a particular
object
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Class Modeling
 Thus, the attributes of book in the above-mentioned college library system
can be
 Author
 Title
 Publisher
 Catalogue number
 Accession number
 Number of pages
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
 Operation to be performed on a book object can include operations to set
and get the values for the above-mentioned attributes.
 Object structure contains both data and behavior within it.
 Two different levels
 Conceptual level
 Each attribute can have corresponding set & get operations in order
to allocate and retrieve the data respectively
 Design level
 Implementation can be done by using graphical user interface
consisting of forms that can be designed that purpose
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Classes and Objects
 A class is a concept within the application domain being modelled
 Class diagram is to model the static view of an application
 Class diagrams are the only diagrams which can be directly mapped with
object-oriented languages and thus widely used at the time of construction.
 Class is what the programmer designs and programs, where as an object is
created from a class at runtime.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Classes and Objects
MyClass
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Attributes and Operations
Triangle
Base : float
Height : float
Area : float
+setBase(in b:float):void
+getBase(): float
+setHeight(in h:float): void
+getHeight():float
+calculateArea(): void
+getArea():float
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Classes and Objects
The purpose of the class diagram can be summarized as −
 Analysis and design of the static view of an application.
 Describe responsibilities of a system.
 Base for component and deployment diagrams.
 Forward and reverse engineering.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
How to Draw a Class Diagram
 Class diagrams have a lot of properties to consider while drawing but here
the diagram will be considered from a top level view.
 Class diagram is basically a graphical representation of the static view of
the system and represents different aspects of the application.
 A collection of class diagrams represent the whole system.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
How to Draw a Class Diagram
The following points should be remembered while drawing a class diagram
 The name of the class diagram should be meaningful to describe the aspect
of the system.
 Each element and their relationships should be identified in advance.
 Responsibility (attributes and methods) of each class should be clearly
identified
 For each class, minimum number of properties should be specified, as
unnecessary properties will make the diagram complicated.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Use of Class Diagram
 Describing the static view of the system.
 Showing the collaboration among the elements of the static view.
 Describing the functionalities performed by the system.
 Construction of software applications using object oriented languages.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Visibility of Attributes and Operations
 Private Visibility
 Public Visibility
 Protected Visibility
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Attributes with Default Values
Triangle
-custName:String =“Tom”
-custID:int = 100
//some operations
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
One to one Association
Unidirectional Association
owns
1
Person Flat
1
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
One to Many Association
Unidirectional Association
owns
1
Person Flat
*
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Many to Many Association
Unidirectional Association
owns
*
Person Flat
*
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
One to One Association
Bidirectional Association
owns
1
Person Flat
1
ownedBy
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
one to Many Association
Bidirectional Association
owns
1
Person Flat
*
ownedBy
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Many to Many Association
Bidirectional Association
owns
*
Person Flat
*
ownedBy
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
one to Many Association
Bidirectional Association
owns
1
Person Flat
*
ownedBy
Mapping class to Java Code
Public class Person
{
public Flat owns;
}
Public class Flat
{
Public Person ownedby;
}
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
One to One Association
Unidirectional Association
owns
1
Person Flat
1
Mapping class to Java Code
Public class Person
{
public Flat owns;
}
Public class Flat
{}
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Mapping class to Java Code
Triangle
-Base : float
-Height : float
-Area : float
-nonOfTriangles:int
+setBase(in b:float):void
+getBase(): float
+setHeight(in h:float): void
+getHeight():float
+calculateArea(): void
+getArea():float
+getNumberOfTrainagle():int
Public class Triangle{
private float base;
private float height;
private float area;
private static int noOfTraingles;
public void setBase(float b)
{}
public float getBase()
{}
public void calculateArea()
{}
Class Scope Attribute
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Role Names
coached By
1
Coach Player
1..6
 Role Name is String placed at the end of an association near the class
to which it applies.
 It denotes the role played by the class with respect to the association
Batsman
Bowler
coaches
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Qualified Association
employed By
1
Company Person
*
One to Many association between company and Person
Employee
Employer
employs
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Qualified Association
employed By
0..1
Company Person
0..1
Qualified association between company and Person
Employee
Employer
employs
empID
 The Qualifier is drawn as small box at the end of an association near the class
from which the navigation should be made
 Qualified associations can be used with one to many or many to many
associations
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Association Class
 An Association Class is a UML construct
that enables an Association to have
attributes and operations (features).
 This results in a hybrid relation with the
characteristics of an Association and a
Class.
 The association class is a class that is
connected to the association of two
classes using a dashed line.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Association Class
 Consider the relationship “person rents flat’. To rent flat, often a contract is required
 Now the details of the rent such as the amount and mode of payment of rent are
neither the property of the class person nor the property of the class Flat
 It is a property of the association ‘rents’. So an association class called ‘Rent’ can be
made and the properties of rent can be included in it. Operations can also be added
to this class
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Ternary association
 Consider the case of buying reference book for a college library.
 Total bills depends on
 The publisher
 The quantity of books
 The price of each book
 Assist in finding total bill that will contain the itemized details
 Multiplicity on all classes has to be *
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Ternary association
Publisher
BookPrice PurchasedQty
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Ternary association
Publisher
BookPrice PurchasedQty
TotalBill
|
|
|
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Recursive association
Person
*
Mother
givesBirthTo
1
Child
 A class may have an association to itself.
 This association is called recursive association
 One person (Mother) can give birth to other
persons (child)
 At one end the person plays the role of mother and
at the end that of a child
import java.util.*;
Public class person
{
Public Collection givesBirthTo;
}
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Multiple Associations between Two Classes
Train Station
*
*
1
1
arrivesAt
leavesFrom
 Two classes can have multiple associations between them.
 Many trains can arrive at a station and many trains can leave a station
Public class Train
{
public Station arrivesAt;
public Station leavesFrom;
}
Public class Station
{
}
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Composite Aggregation
 This aggregation shows that the parts reside within the whole.
 Composition implies a relationship where the child cannot exist independent of the
parent.
 more specific and use the composition link in cases where in addition to the part-of
relationship between Class A and Class B
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Generalization
 Generalization is a mechanism for combining similar classes of objects
into a single, more general class
 Generalization identifies commonalities among a set of entities
 The commonality may be of attributes, behaviour, or both
 In other words, a superclass has the most general attributes, operations,
and relationships that may be shared with subclasses. A subclass may
have more specialized attributes and operations.
 Specialization is the reverse process of Generalization means creating
new sub-classes from an existing class
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Abstract Class
 Abstract class is a class that is not allowed to have any instances.
 Attributes and operations are only declared within this class
 Subclasses inherit these features from the abstract class
 Each subclass will have its own definition for each method declared in
the abstract superclass.
 It is represented by italicizing the superclass or using the keyword
{abstract} beside the superclass name, in the name compartment of the
superclass
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Abstract Class
Abstract class
CalArea():void{abstract}
AreaOf Circle AreaOfTraingle
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Abstract Class
 A class that has one abstract operation is compulsorily an abstract class
 A subclass that inherits from an abstract superclass must implement all
operations of that superclass, or itself become abstract.
 Abstract operations are denoted by the keyword {abstract} beside the
operation declaration.

More Related Content

PPTX
Unit 5.pptx
PPTX
Unit3.pptx
PPTX
OCL3_10_05.pptx
PPTX
Unit 2 Requirement Analysis.pptx
PPTX
Lecture 03 Software Risk Management
PPT
Unit 8-risk manaegement (1) -
PPTX
Software Engineering - Spiral Model
PPTX
Risk Mitigation, Monitoring and Management Plan (RMMM)
Unit 5.pptx
Unit3.pptx
OCL3_10_05.pptx
Unit 2 Requirement Analysis.pptx
Lecture 03 Software Risk Management
Unit 8-risk manaegement (1) -
Software Engineering - Spiral Model
Risk Mitigation, Monitoring and Management Plan (RMMM)

What's hot (20)

PPTX
Chapter 1 - Software Design - Introduction.pptx
PDF
INTRODUCTION TO UML DIAGRAMS
PDF
Caso De Uso
PPTX
Risk Management
PPT
Software Process Improvement
PPT
Risk management(software engineering)
PPTX
Software Engineering and Traditional Software development models
PDF
Software Project Management: Risk Management
PPTX
Software Crisis
PDF
INTRODUCTION TO SOFTWARE ENGINEERING
PPT
Lecture 12 requirements modeling - (system analysis)
PPTX
Overview of UML Diagrams
PPT
software effort estimation
PPT
Software Engineering (Risk Management)
PPTX
Case tools(computer Aided software Engineering)
PDF
Software process
PPTX
Spiral model
PPTX
Requirement Engineering and Software Requirement Specification
Chapter 1 - Software Design - Introduction.pptx
INTRODUCTION TO UML DIAGRAMS
Caso De Uso
Risk Management
Software Process Improvement
Risk management(software engineering)
Software Engineering and Traditional Software development models
Software Project Management: Risk Management
Software Crisis
INTRODUCTION TO SOFTWARE ENGINEERING
Lecture 12 requirements modeling - (system analysis)
Overview of UML Diagrams
software effort estimation
Software Engineering (Risk Management)
Case tools(computer Aided software Engineering)
Software process
Spiral model
Requirement Engineering and Software Requirement Specification
Ad

Similar to Unit 4 Object Oriented Analysis.pptx (20)

PDF
SYBTech_2021_Patt_Unit 4 Object Oriented Analysis Part I.pdf
PPTX
UseCase Model.pptx
PDF
FORMALIZATION & DATA ABSTRACTION DURING USE CASE MODELING IN OBJECT ORIENTED ...
PDF
Formalization & data abstraction during use case modeling in object oriented ...
PPT
Use case Diagram
PPT
Chapter1
PDF
502 Object Oriented Analysis and Design.pdf
PPT
Ooad
PPT
Analysis modeling
PPTX
OOAD unit1 introduction to object orientation
PDF
Cs 2401 Unit 1
PPT
Analysis modeling in software engineering
PDF
sadfinal2007-121022230733-phpapp01.pdf
PPT
Chapter 5 Analysis Modeling of Software Engineering.ppt
PPT
6. Requirement Modelinbbdhdhbdhhdbbdg.ppt
PPTX
Over view of system analysis and design
PPTX
What is Object Orientation?
ODP
Software Patterns
DOCX
DOCX
SYBTech_2021_Patt_Unit 4 Object Oriented Analysis Part I.pdf
UseCase Model.pptx
FORMALIZATION & DATA ABSTRACTION DURING USE CASE MODELING IN OBJECT ORIENTED ...
Formalization & data abstraction during use case modeling in object oriented ...
Use case Diagram
Chapter1
502 Object Oriented Analysis and Design.pdf
Ooad
Analysis modeling
OOAD unit1 introduction to object orientation
Cs 2401 Unit 1
Analysis modeling in software engineering
sadfinal2007-121022230733-phpapp01.pdf
Chapter 5 Analysis Modeling of Software Engineering.ppt
6. Requirement Modelinbbdhdhbdhhdbbdg.ppt
Over view of system analysis and design
What is Object Orientation?
Software Patterns
Ad

More from Nitin Shelake (13)

PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Agile Development and Scrum, Extreme Programming
PDF
Unit III SOCIAL MEDIA MARKETING and Facebook marketing
PPTX
Unit II Search Engine Marketing Added.pptx
PPTX
Unit I ESSENTIAL OF DIGITAL MARKETING.pptx
PPTX
ITE Course Unit 1Productivity Tools For An Engineers
PDF
SYBTech_2021_Patt_Unit 5 part I Activity Diagram.pdf
PDF
SYBTech_2021_Patt_Unit3 Agile Development.pdf
PDF
SYBTECH _2021_Unit 2 Requirement Analysis.pdf
PPTX
JAVASRIPT and PHP Basics# Unit 2 Webdesign
PPTX
Hyper Text Markup Language, Cascading Style Sheet
PPTX
ITE Course Unit 1 Productivity Tool-Word processing tools
PPTX
SEMD U_I Introduction to SE.pptx
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Agile Development and Scrum, Extreme Programming
Unit III SOCIAL MEDIA MARKETING and Facebook marketing
Unit II Search Engine Marketing Added.pptx
Unit I ESSENTIAL OF DIGITAL MARKETING.pptx
ITE Course Unit 1Productivity Tools For An Engineers
SYBTech_2021_Patt_Unit 5 part I Activity Diagram.pdf
SYBTech_2021_Patt_Unit3 Agile Development.pdf
SYBTECH _2021_Unit 2 Requirement Analysis.pdf
JAVASRIPT and PHP Basics# Unit 2 Webdesign
Hyper Text Markup Language, Cascading Style Sheet
ITE Course Unit 1 Productivity Tool-Word processing tools
SEMD U_I Introduction to SE.pptx

Recently uploaded (20)

PPTX
Fundamentals of Mechanical Engineering.pptx
PPTX
introduction to high performance computing
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PPTX
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PPT
Total quality management ppt for engineering students
PDF
Soil Improvement Techniques Note - Rabbi
PDF
Abrasive, erosive and cavitation wear.pdf
PDF
Design Guidelines and solutions for Plastics parts
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PDF
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Fundamentals of Mechanical Engineering.pptx
introduction to high performance computing
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
tack Data Structure with Array and Linked List Implementation, Push and Pop O...
Fundamentals of safety and accident prevention -final (1).pptx
distributed database system" (DDBS) is often used to refer to both the distri...
Information Storage and Retrieval Techniques Unit III
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Total quality management ppt for engineering students
Soil Improvement Techniques Note - Rabbi
Abrasive, erosive and cavitation wear.pdf
Design Guidelines and solutions for Plastics parts
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Categorization of Factors Affecting Classification Algorithms Selection
Accra-Kumasi Expressway - Prefeasibility Report Volume 1 of 7.11.2018.pdf
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
"Array and Linked List in Data Structures with Types, Operations, Implementat...

Unit 4 Object Oriented Analysis.pptx

  • 1. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology OBJECT ORIENTED ANALYSIS  Object Oriented Analysis Process, Use Case Modeling: Actor Identification, Actor Classification, Actor Generalization, Use Cases Identification, Communication, Uses/Include and Extend Associations, Writing a Formal Use Cases, Use Case realizations Domain / Class Modeling: Approaches For Identifying Classes (Noun-Phase Approach, Common Class Pattern Approach, Class Responsibilities Collaboration Approach, Naming Classes, Class Associations and Identification of Associations, Generalization/Specialization Relationship, Aggregation and Composition Relationships, Attributes and Methods Identification
  • 2. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Object-oriented analysis and design  Object-oriented programming (OOP) is a method  based on the concept of “objects",  which are data structures that contain data,  in the form of fields,  often known as attributes;  and code, in the form of procedures,  often known as methods
  • 3. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Object-oriented analysis and design  What is OOAD?- Object-oriented analysis and design (OOAD) is a software engineering approach that models a system as a group of interacting objects.  Analysis — understanding, finding and describing concepts in the problem domain.  Design — understanding and defining software solution/objects that represent the analysis concepts and will eventually be implemented in code.
  • 4. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Object-oriented analysis and design  OOAD - A software development approach that emphasizes a logical solution based on objects.  Software development is dynamic and always undergoing major change.  System development refers to all activities that go into producing information system solution.
  • 5. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Object-oriented analysis and design System development activities consist of  system analysis,  modelling,  design,  implementation,  testing and maintenance.
  • 6. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Object-oriented analysis and design  A software development methodology series of processes can lead to the development of an application.  Practices, procedures, and rules used to develop software, totally based on system requirements  Two Approaches  Traditional Approach  Objected-Oriented Approach
  • 7. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Traditional Approach  Collection of programs or functions.  A system that is designed for performing certain actions.  Algorithms + Data Structures = Programs.  Software Development Models (Waterfall, Spiral, Incremental, etc..)
  • 8. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Object Oriented Approach  OO development offers a different model from the traditional software based on functions and procedures.  software is a collection of discrete object that encapsulate their data as well as the functionality.  Each object has attributes (properties) and method (procedures).  software by building self contained modules or objects that can be easily REPLACED, MODIFIED AND REUSED.  Objects grouped in to classes and object are responsible for itself.
  • 9. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Object Oriented Approach  OO approach is more like creating a lot of helpers  take on an active role, a spirit, that form a community whose interactions become the application.  Reusable  Modified  Replaced
  • 10. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Examples Of Object Oriented Systems  In OO system , “everything is object”  A spreadsheet cell, bar chart, title in bar chart, report, numbers, arrays, records, fields, files, forms, an invoice, etc.  A window object is responsible for things like opening, sizing, and closing itself  A chart object is responsible for things like maintaining data and labels even for drawing itself.
  • 11. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Examples Of Object Oriented Systems  In OO system , “everything is object”  A spreadsheet cell, bar chart, title in bar chart, report, numbers, arrays, records, fields, files, forms, an invoice, etc.  A window object is responsible for things like opening, sizing, and closing itself  A chart object is responsible for things like maintaining data and labels even for drawing itself.
  • 12. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology WHAT IS AN OBJECT?  The term object was first formally utilized in the Simula language to simulate some aspect of reality.  Attributes or properties describe object‘s state (data) and methods (properties or functions) define its behaviour.  An object is an entity.  It knows things (has attributes)  It does things (provides services or has methods
  • 13. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Use Case Modeling  In use-case modeling, the system is looked upon as a black box whose boundaries are defined by its functionality to external stimuli.  The actual description of the use-case is usually given in plain text. A popular notation promoted by UML is the stick figure notation  Both visual and text representation are needed for a complete view.  A use-case model represents the use-case view of the system  A use-case view of a system may consist of many Use-case diagrams.  An use-case diagram shows (the system), the actors, the use-cases and the relationship among them.
  • 14. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Components of Use-case Model The components of a Use-case model are: System Modeled  Actors Use-cases  Stimulus System Name name Use-case
  • 15. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology System  As a part of the use-case modeling, the boundaries of the system are developed.  System in the use-case diagram is a box with the name appearing on the top.  Define the scope of the system that you are going to design with your EXAM. (software scope) EXAM Software Appln.
  • 16. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Actors  An actor is something or someone that interacts with the system.  Actor communicates with the system by sending and receiving messages.  An actor provides the stimulus to activate an Use-case.  Message sent by an actor may result in more messages to actors and to Use-cases.  Actors can be ranked: primary and secondary; active and passive.  Actor is a role not an individual instance.
  • 17. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Actors Identification  Identifying actors is one of the first steps in use case analysis.  Each type of external entities with which the system must interact is represented by an actor
  • 18. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology which has the following characteristics:  An actor in use case modeling specifies a role played by a user or any other system that interacts with the subject.  An Actor models a type of role played by an entity that interacts with the subject (e.g., by exchanging signals and data), but which is external to the subject.  Actors may represent roles played by human users, external hardware, or other subjects.  Actors do not necessarily represent specific physical entities but merely particular facets (i.e., “roles”) of some entities that are relevant to the specification of its associated use cases.
  • 19. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Finding Actors  The actors of a system can be identified by answering a number of questions:  Who will use the functionality of the system?  Who will maintain the system?  What devices does the system need to handle?  What other system does this system need to interact?  Who or what has interest in the results of this system?
  • 20. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Actors classification  Actors can be people, other systems, time triggers, or event triggers.  Primary Actor: a user whose defined user goal and is fulfilled by the system  The primary actor of a use case is the stakeholder that calls on the system to deliver one of its services. It has a goal with respect to the system – one that can be satisfied by its operation. The primary actor is often, but not always, the actor who triggers the use case.
  • 21. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Actors classification  Supporting Actors: a user who provides a service (e.g., information) to the system.  A supporting actor (also known as a secondary actor) in a use case in an external actor that provides a service to the system under design. It might be a high-speed printer, a web service, or humans that have to do some research and get back to us.
  • 22. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Types of actors include:
  • 23. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Actors Generalization  refers to the relationship which can exist between two actors in a use case diagram and which shows that one actor (descendant) inherits the role and properties of another actor (ancestor).  The generalization relationship also implies that the descendant actor can use all the use cases that have been defined for its ancestor.  generalization is simply the inheritance relationship between two actors by which one actor inherits all the properties and relationships of another actor.
  • 24. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Use-cases  A Use-case in UML is defined as a set of sequences of actions a system performs that yield an observable result of value to a particular actor.  Actions can involve communicating with number of actors as well as performing calculations and work inside the system.  A Use-case  is always initiated by an actor.  provides a value to an actor.  must always be connected to at least one actor.  must be a complete description.
  • 25. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology UseCase Identification  A use case is a methodology used in system analysis to identify, clarify and organize system requirements.  The use case is made up of a set of possible sequences of interactions between systems and users in a particular environment and related to a particular goal.  Use cases describe the functional requirements of a system from the end user's perspective
  • 26. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology UseCase Identification  creating a goal-focused sequence of events that is easy for users and developers to follow  The alternate flow, also known as an extending use case, describes normal variations to the basic flow as well as unusual situations.
  • 27. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology UseCase Identification A use case should display the following characteristics:  Organizes functional requirements.  Models the goals of system/actor interactions.  Records paths -- called scenarios -- from trigger events to goals.  Describes one main flow of events and various alternate flows.  Multi-level, so that one use case can use the functionality of another one.
  • 28. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology UseCase Identification Use cases can be identified in two methods: i. Use case identification on actor-based: method (a) Find and specify all the actors by looking at which users will use the system and which other systems must interact with it. (b) For each actor, identifying the processes they initiate or participate in by looking at how the actor communicate/interact with (or use) the system to do his work.
  • 29. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology UseCase Identification ii. Use case identification on event-based method (a) Identify the external events that a system must respond to. (b) Relate the events to actors and use cases.
  • 30. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology To represent complex relationships between different use cases, we can use the extend and include relationships.  Extend relationship: The use case is optional and comes after the base use case. It is represented by a dashed arrow in the direction of the base use case with the notation <<extend>>.  Include relationship: The use case is mandatory and part of the base use case. It is represented by a dashed arrow in the direction of the included use case with the notation <<include>>. Uses/Include and Extend Associations
  • 31. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
  • 32. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
  • 33. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Class Modeling  Use Static modelling is the base on which the edifice of object orientation is built.  A static model signifies the conceptual view of a system.  Example college library system will definitely have concepts like book, magazine, library attendant, librarian, student, teacher, book-issue policy, book return policy, book procurement policy, a procedure to calculate fine in the case a book/magazine is returned after the due date, a procedure to determine the book//magazine to be replaced only in the reference section and those in the take-home section and so on.
  • 34. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Class Modeling  Object can be instantiated from classes  An object has identity, data and operations to be performed on the data.  The identity of the object is indicated by the uniqueness of its name.  This unique name differentiates the particular object from other objects.  The data stored within an object includes the attributes of the object.  The operations serve as a means manipulating data stored in a particular object
  • 35. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Class Modeling  Thus, the attributes of book in the above-mentioned college library system can be  Author  Title  Publisher  Catalogue number  Accession number  Number of pages
  • 36. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology  Operation to be performed on a book object can include operations to set and get the values for the above-mentioned attributes.  Object structure contains both data and behavior within it.  Two different levels  Conceptual level  Each attribute can have corresponding set & get operations in order to allocate and retrieve the data respectively  Design level  Implementation can be done by using graphical user interface consisting of forms that can be designed that purpose
  • 37. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Classes and Objects  A class is a concept within the application domain being modelled  Class diagram is to model the static view of an application  Class diagrams are the only diagrams which can be directly mapped with object-oriented languages and thus widely used at the time of construction.  Class is what the programmer designs and programs, where as an object is created from a class at runtime.
  • 38. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Classes and Objects MyClass
  • 39. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Attributes and Operations Triangle Base : float Height : float Area : float +setBase(in b:float):void +getBase(): float +setHeight(in h:float): void +getHeight():float +calculateArea(): void +getArea():float
  • 40. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Classes and Objects The purpose of the class diagram can be summarized as −  Analysis and design of the static view of an application.  Describe responsibilities of a system.  Base for component and deployment diagrams.  Forward and reverse engineering.
  • 41. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology How to Draw a Class Diagram  Class diagrams have a lot of properties to consider while drawing but here the diagram will be considered from a top level view.  Class diagram is basically a graphical representation of the static view of the system and represents different aspects of the application.  A collection of class diagrams represent the whole system.
  • 42. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology How to Draw a Class Diagram The following points should be remembered while drawing a class diagram  The name of the class diagram should be meaningful to describe the aspect of the system.  Each element and their relationships should be identified in advance.  Responsibility (attributes and methods) of each class should be clearly identified  For each class, minimum number of properties should be specified, as unnecessary properties will make the diagram complicated.
  • 43. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Use of Class Diagram  Describing the static view of the system.  Showing the collaboration among the elements of the static view.  Describing the functionalities performed by the system.  Construction of software applications using object oriented languages.
  • 44. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Visibility of Attributes and Operations  Private Visibility  Public Visibility  Protected Visibility
  • 45. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Attributes with Default Values Triangle -custName:String =“Tom” -custID:int = 100 //some operations
  • 46. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology One to one Association Unidirectional Association owns 1 Person Flat 1
  • 47. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology One to Many Association Unidirectional Association owns 1 Person Flat *
  • 48. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Many to Many Association Unidirectional Association owns * Person Flat *
  • 49. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology One to One Association Bidirectional Association owns 1 Person Flat 1 ownedBy
  • 50. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology one to Many Association Bidirectional Association owns 1 Person Flat * ownedBy
  • 51. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Many to Many Association Bidirectional Association owns * Person Flat * ownedBy
  • 52. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology one to Many Association Bidirectional Association owns 1 Person Flat * ownedBy Mapping class to Java Code Public class Person { public Flat owns; } Public class Flat { Public Person ownedby; }
  • 53. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology One to One Association Unidirectional Association owns 1 Person Flat 1 Mapping class to Java Code Public class Person { public Flat owns; } Public class Flat {}
  • 54. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Mapping class to Java Code Triangle -Base : float -Height : float -Area : float -nonOfTriangles:int +setBase(in b:float):void +getBase(): float +setHeight(in h:float): void +getHeight():float +calculateArea(): void +getArea():float +getNumberOfTrainagle():int Public class Triangle{ private float base; private float height; private float area; private static int noOfTraingles; public void setBase(float b) {} public float getBase() {} public void calculateArea() {} Class Scope Attribute
  • 55. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Role Names coached By 1 Coach Player 1..6  Role Name is String placed at the end of an association near the class to which it applies.  It denotes the role played by the class with respect to the association Batsman Bowler coaches
  • 56. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Qualified Association employed By 1 Company Person * One to Many association between company and Person Employee Employer employs
  • 57. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Qualified Association employed By 0..1 Company Person 0..1 Qualified association between company and Person Employee Employer employs empID  The Qualifier is drawn as small box at the end of an association near the class from which the navigation should be made  Qualified associations can be used with one to many or many to many associations
  • 58. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Association Class  An Association Class is a UML construct that enables an Association to have attributes and operations (features).  This results in a hybrid relation with the characteristics of an Association and a Class.  The association class is a class that is connected to the association of two classes using a dashed line.
  • 59. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Association Class  Consider the relationship “person rents flat’. To rent flat, often a contract is required  Now the details of the rent such as the amount and mode of payment of rent are neither the property of the class person nor the property of the class Flat  It is a property of the association ‘rents’. So an association class called ‘Rent’ can be made and the properties of rent can be included in it. Operations can also be added to this class
  • 60. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Ternary association  Consider the case of buying reference book for a college library.  Total bills depends on  The publisher  The quantity of books  The price of each book  Assist in finding total bill that will contain the itemized details  Multiplicity on all classes has to be *
  • 61. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Ternary association Publisher BookPrice PurchasedQty
  • 62. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Ternary association Publisher BookPrice PurchasedQty TotalBill | | |
  • 63. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Recursive association Person * Mother givesBirthTo 1 Child  A class may have an association to itself.  This association is called recursive association  One person (Mother) can give birth to other persons (child)  At one end the person plays the role of mother and at the end that of a child import java.util.*; Public class person { Public Collection givesBirthTo; }
  • 64. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Multiple Associations between Two Classes Train Station * * 1 1 arrivesAt leavesFrom  Two classes can have multiple associations between them.  Many trains can arrive at a station and many trains can leave a station Public class Train { public Station arrivesAt; public Station leavesFrom; } Public class Station { }
  • 65. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Composite Aggregation  This aggregation shows that the parts reside within the whole.  Composition implies a relationship where the child cannot exist independent of the parent.  more specific and use the composition link in cases where in addition to the part-of relationship between Class A and Class B
  • 66. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Generalization  Generalization is a mechanism for combining similar classes of objects into a single, more general class  Generalization identifies commonalities among a set of entities  The commonality may be of attributes, behaviour, or both  In other words, a superclass has the most general attributes, operations, and relationships that may be shared with subclasses. A subclass may have more specialized attributes and operations.  Specialization is the reverse process of Generalization means creating new sub-classes from an existing class
  • 67. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Abstract Class  Abstract class is a class that is not allowed to have any instances.  Attributes and operations are only declared within this class  Subclasses inherit these features from the abstract class  Each subclass will have its own definition for each method declared in the abstract superclass.  It is represented by italicizing the superclass or using the keyword {abstract} beside the superclass name, in the name compartment of the superclass
  • 68. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Abstract Class Abstract class CalArea():void{abstract} AreaOf Circle AreaOfTraingle
  • 69. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Abstract Class  A class that has one abstract operation is compulsorily an abstract class  A subclass that inherits from an abstract superclass must implement all operations of that superclass, or itself become abstract.  Abstract operations are denoted by the keyword {abstract} beside the operation declaration.