SlideShare a Scribd company logo
1 of 102
Download to read offline
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.
The system is represented by a
boundary box, which contains all the
use cases and actors involved in the
system.
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
 Who is using the system?
 Incase of new system, who will be using the system?
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
Naming a Use case
 Name should provide a general description of the usecase function.
 Name should express what happens when an instance of the usecase is
performed
 Name should be active, often expressed in the form of verb (Borrow) or
verb and noun (Borrow books)
 Naming should be done with care.
 The description of the usecase should be descriptive and consistent.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Naming a Use case
 Example:
 The usecase that describes what happens when a person deposits money
into an ATM machine could be named either receive money or deposit
money.
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
 Design level
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
Role Names
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
Approaches for identifying classes
 Noun Phrase approach
 Common class patterns approach
 Usecase driven, sequence/ collaboration modeling approach
 Classes, Responsibilities and Collaborators approach
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Noun Phrase Approach
 Proposed by Rebecca Wirfs-Broack, Brian Wilkerson and Lauren
Wiener.
 The requirements or Usecase
 Nouns – textual description are considered to be classes
 Verbs – to be methods of the classes
 All plurals are changed to singular, noun are listed, divided into
 Relevant Classes, Fuzzy Classes and irrelevant classes
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Identifying Tentative Classes
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Identifying Tentative Classes
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Selecting Classes from the relevant and Fuzzy
Categories
 Redundant Classes –
 do not keep two classes that express same information
 Choose your vocabulary carefully
 Adjective Classes
 Suggest different kind of object
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Selecting Classes from the relevant and Fuzzy
Categories
 Attribute Classes
 Tentative objects that are used only as values should be defined or
restated as attributes and not as class
 Irrelevant Classes
 Class have purpose and every class should be clearly defined and
necessary.
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
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
Approaches for identifying classes
 Noun Phrase approach
 Common class patterns approach
 Usecase driven, sequence/ collaboration modeling approach
 Classes, Responsibilities and Collaborators approach
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
The ViaNet bank ATM System:
Identifying classes by using Noun Phrase Approach
 Initial List of Noun Phrases: Candidate Classes
Account Cash Fund Savings account
Account Balance Check Invalid PIN Step
Amount Checking Message System
Approval process Checking Account Money Transaction
ATM Card Client Password Transaction
ATM Machine Client’s Account PIN
Bank Dollar PIN Code
Bank Client Envelope Record
Card Four Digits Savings
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
The ViaNet bank ATM System:
Identifying classes by using Noun Phrase Approach
 The following irrelevant classes can be eliminated because they do not
belongs to the problem statement
 Envelope
 Four Digits
 Step
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
The ViaNet bank ATM System:
Identifying classes by using Noun Phrase Approach
 Initial List of Noun Phrases: Candidate Classes
Account Cash Fund Savings account
Account Balance Check Invalid PIN Step
Amount Checking Message System
Approval process Checking Account Money Transaction
ATM Card Client Password Transaction
ATM Machine Client’s Account PIN
Bank Dollar PIN Code
Bank Client Envelope Record
Card Four Digits Savings
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Reviewing the Redundant Classes and Building a
Common Vocabulary
 Need to review the candidate list to see which classes are redundant
 If different words are being used to describe the same idea, must select
the one that is the most meaningful in the context of the system and
eliminate the others.
 Client, BankClient = BankClient(the term Chosen)
 Account, Client’s Account = Account
 Checking, Checking Account = Checking Account
 Savings, Savings Account = Savings Account
 ATM Card, Card = ATM Card
 Fund, Money = Fund PIN, PIN Code = PIN
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
The ViaNet bank ATM System:
Identifying classes by using Noun Phrase Approach
 Initial List of Noun Phrases: Candidate Classes
Account Cash Fund Savings account
Account Balance Check Invalid PIN Step
Amount Checking Message System
Approval process Checking Account Money Transaction
ATM Card Client Password TransactionHist-
ATM Machine Client’s Account PIN
Bank Dollar PIN Code
Bank Client Envelope Record
Card Four Digits Savings
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Reviewing the Classes Containing Adjectives
 Again review the remaining list, now with an eye on classes with
adjectives
 Does the object represented by noun behave differently when the
adjective is applied to it?
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Reviewing the Possible Attributes
 Next review focuses on identifying the noun phrases that are attributes, not
classes.
 Noun phrases used only as values should be restated as attributes.
 This process also will help us identify attributes of the classes in the system.
 Amount : A value, not a class.
 Account Balance : An attribute of the Account Class
 Invalid PIN : It is only a value, not a class
 Password : An attribute, possibly of the BankClient class.
 Transaction History : An attribute, possibly of the Transaction class.
 PIN : An attribute, possibly of the BankClient class.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
The ViaNet bank ATM System:
Identifying classes by using Noun Phrase Approach
 Initial List of Noun Phrases: Candidate Classes
Account Cash Fund Savings account
Account Balance Check Invalid PIN Step
Amount Checking Message System
Approval process Checking Account Money Transaction
ATM Card Client Password TransactionHist-
ATM Machine Client’s Account PIN Currency
Bank Dollar PIN Code
Bank Client Envelope Record
Card Four Digits Savings
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Reviewing the Class Purpose
 Identifying the classes that play a role in achieving system goals and
requirements is a major activity of object oriented analysis.
 Each class must have a purpose
 Every class should be clearly defined and necessary in the context of
achieving the system’s goals
 If you cannot formulate a statement of purpose for a class, simply eliminate
it.
 The classes that add no purpose to the system have been deleted from the
list
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Common Class Patterns Approach
 Based on a Knowledge base of the common Classes
 Proposed by Shlaer, Mellor
 Complied and listed pattern for finding the candidate class & Object
 Name. Concept Class
 Context. It encompasses principles that are not tangible but used to organize
or keep track of business activities or communications.
 Example. Performance is an example of concept class object
 Name. Event Class
 Context. Event classes are points in time that must be recorded. Things
happen, usually to something else at a given date and time or as a step in
an ordered sequence.
 Example. Landing, interrupt, request and order are possible events
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Common Class Patterns Approach
 Name. Organization Class
 Context. An organization class is a collection of people, resources facilities,
or groups to which the users belong.
 Example. An accounting department might be considered a potential class
 Name. People Class
 Context. The people class represents the different roles users play in
interacting with the application.
 Example. Employee, client, teacher and manager are examples
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Common Class Patterns Approach
 Name. Places Class
 Context. Places are physical locations that the system must keep
information about.
 Example. Buildings, stores, sites, and offices are examples of places.
 Name. Tangible things and devices class
 Context. This class includes physical objects or groups of objects that are
tangible and devices with which the application interacts.
 Example. Cars are an example of tangible things and pressure sensors
are an example of devices
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Common Class Patterns Approach
 Name. Places Class
 Context. Places are physical locations that the system must keep
information about.
 Example. Buildings, stores, sites, and offices are examples of places.
 Name. Tangible things and devices class
 Context. This class includes physical objects or groups of objects that are
tangible and devices with which the application interacts.
 Example. Cars are an example of tangible things and pressure sensors
are an example of devices
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Usecase Driven Approach
 Identifying Classes and their Behaviors through Sequence/Collaboration
Modeling
 Implementation of Scenarios
 Decomposing a Use-Case Scenario with a Sequence Diagram
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Classes, Responsibilities and Collaborators
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Classes, Responsibilities and Collaborators Process
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Classes, Responsibilities and Collaborators :-
Example ViaNet Bank ATM System
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Naming Classes
 Name should b singular
 Use general name with user or client comfortable
 Name should reflect its intrinsic nature
 Use Readable names
 Capitalize class names
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Class Associations and Identification of
Associations
 Association represent a physical or conceptual connection between two
or more objects
 Identify association
 Is the class capable of fulfilling the required task by itself?
 If not, what does it need?
 From what other class can it acquire what it needs?
 Guidelines for identifying association
 Common Association Patterns-Location,Communication
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
Generalization
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Guidelines for Generalization/Specialization Relationship
 Top-down – noun phrased composed of various adjectives
 Bottom Up – similar attribute or method
 Reusability- move attribute and behavior (methods) as high as possible
in the hierarchy
 Multiple inheritance – Avoid excessive use of multiple inheritance.
Software Engineering Modeling and Design
Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
Aggregation and Composition Relationships
 A-Part-of Relationship
 Represent a situation where a class consists of several component classes
 Transitivity – if A is part of B and B is Part of C, then A is part of C
 Antisymmetry – if A is part of B then B is Not Part of A
 Does part class belong to a problem domain?
 Is the part class within the system’s responsibilities?
 Does the part class capture more than a single value?
 Does it provide a useful abstraction in dealing with the problem
domain?
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 Related Content

Similar to SYBTech_2021_Patt_Unit 4 Object Oriented Analysis Part I.pdf

OOAD unit1 introduction to object orientation
 OOAD unit1 introduction to object orientation OOAD unit1 introduction to object orientation
OOAD unit1 introduction to object orientation
Dr Chetan Shelke
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
Sisir Ghosh
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
SHIVAM691605
 

Similar to SYBTech_2021_Patt_Unit 4 Object Oriented Analysis Part I.pdf (20)

Cs 2401 Unit 1
Cs 2401 Unit 1Cs 2401 Unit 1
Cs 2401 Unit 1
 
Analysis modeling
Analysis modelingAnalysis modeling
Analysis modeling
 
Analysis modeling in software engineering
Analysis modeling in software engineeringAnalysis modeling in software engineering
Analysis modeling in software engineering
 
sadfinal2007-121022230733-phpapp01.pdf
sadfinal2007-121022230733-phpapp01.pdfsadfinal2007-121022230733-phpapp01.pdf
sadfinal2007-121022230733-phpapp01.pdf
 
OOAD unit1 introduction to object orientation
 OOAD unit1 introduction to object orientation OOAD unit1 introduction to object orientation
OOAD unit1 introduction to object orientation
 
Over view of system analysis and design
Over view of system analysis and designOver view of system analysis and design
Over view of system analysis and design
 
Sdlc
SdlcSdlc
Sdlc
 
Sdlc
SdlcSdlc
Sdlc
 
Slides chapters 6-7
Slides chapters 6-7Slides chapters 6-7
Slides chapters 6-7
 
SE chapters 6-7
SE chapters 6-7SE chapters 6-7
SE chapters 6-7
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
Object Oriented Analysis & Design
Object Oriented Analysis & DesignObject Oriented Analysis & Design
Object Oriented Analysis & Design
 
Cs 2352 object oriented analysis and design
Cs 2352 object oriented analysis and designCs 2352 object oriented analysis and design
Cs 2352 object oriented analysis and design
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
 
System Development Life Cycle (SDLC)
System Development Life Cycle (SDLC)System Development Life Cycle (SDLC)
System Development Life Cycle (SDLC)
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
Workshop on Basics of Software Engineering (DFD, UML and Project Culture)
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
 
software_engg-chap-03.ppt
software_engg-chap-03.pptsoftware_engg-chap-03.ppt
software_engg-chap-03.ppt
 

More from NitinShelake4 (11)

SYBTech_2021_Patt_Unit 5 part I Activity Diagram.pdf
SYBTech_2021_Patt_Unit 5 part I Activity Diagram.pdfSYBTech_2021_Patt_Unit 5 part I Activity Diagram.pdf
SYBTech_2021_Patt_Unit 5 part I Activity Diagram.pdf
 
SYBTech_2021_Patt_Unit3 Agile Development.pdf
SYBTech_2021_Patt_Unit3 Agile Development.pdfSYBTech_2021_Patt_Unit3 Agile Development.pdf
SYBTech_2021_Patt_Unit3 Agile Development.pdf
 
SYBTECH _2021_Unit 2 Requirement Analysis.pdf
SYBTECH _2021_Unit 2 Requirement Analysis.pdfSYBTECH _2021_Unit 2 Requirement Analysis.pdf
SYBTECH _2021_Unit 2 Requirement Analysis.pdf
 
JAVASRIPT and PHP Basics# Unit 2 Webdesign
JAVASRIPT and PHP Basics# Unit 2 WebdesignJAVASRIPT and PHP Basics# Unit 2 Webdesign
JAVASRIPT and PHP Basics# Unit 2 Webdesign
 
Hyper Text Markup Language, Cascading Style Sheet
Hyper Text Markup Language, Cascading Style SheetHyper Text Markup Language, Cascading Style Sheet
Hyper Text Markup Language, Cascading Style Sheet
 
ITE Course Unit 1 Productivity Tool-Word processing tools
ITE Course Unit 1 Productivity Tool-Word processing toolsITE Course Unit 1 Productivity Tool-Word processing tools
ITE Course Unit 1 Productivity Tool-Word processing tools
 
OCL3_10_05.pptx
OCL3_10_05.pptxOCL3_10_05.pptx
OCL3_10_05.pptx
 
Unit 5.pptx
Unit 5.pptxUnit 5.pptx
Unit 5.pptx
 
Unit3.pptx
Unit3.pptxUnit3.pptx
Unit3.pptx
 
Unit 2 Requirement Analysis.pptx
Unit 2 Requirement Analysis.pptxUnit 2 Requirement Analysis.pptx
Unit 2 Requirement Analysis.pptx
 
SEMD U_I Introduction to SE.pptx
SEMD U_I Introduction to SE.pptxSEMD U_I Introduction to SE.pptx
SEMD U_I Introduction to SE.pptx
 

Recently uploaded

Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Lovely Professional University
 

Recently uploaded (20)

Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdf
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
Circuit Breaker arc phenomenon.pdf engineering
Circuit Breaker arc phenomenon.pdf engineeringCircuit Breaker arc phenomenon.pdf engineering
Circuit Breaker arc phenomenon.pdf engineering
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
 
How to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdfHow to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdf
 
Intelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent ActsIntelligent Agents, A discovery on How A Rational Agent Acts
Intelligent Agents, A discovery on How A Rational Agent Acts
 
E-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are presentE-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are present
 
ChatGPT Prompt Engineering for project managers.pdf
ChatGPT Prompt Engineering for project managers.pdfChatGPT Prompt Engineering for project managers.pdf
ChatGPT Prompt Engineering for project managers.pdf
 
Piping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdfPiping and instrumentation diagram p.pdf
Piping and instrumentation diagram p.pdf
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Lesson no16 application of Induction Generator in Wind.ppsx
Lesson no16 application of Induction Generator in Wind.ppsxLesson no16 application of Induction Generator in Wind.ppsx
Lesson no16 application of Induction Generator in Wind.ppsx
 
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfBURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AI
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docx
 

SYBTech_2021_Patt_Unit 4 Object Oriented Analysis Part I.pdf

  • 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. The system is represented by a boundary box, which contains all the use cases and actors involved in the system.
  • 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  Who is using the system?  Incase of new system, who will be using the system?
  • 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 Naming a Use case  Name should provide a general description of the usecase function.  Name should express what happens when an instance of the usecase is performed  Name should be active, often expressed in the form of verb (Borrow) or verb and noun (Borrow books)  Naming should be done with care.  The description of the usecase should be descriptive and consistent.
  • 31. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Naming a Use case  Example:  The usecase that describes what happens when a person deposits money into an ATM machine could be named either receive money or deposit money.
  • 32. 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
  • 33. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
  • 34. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
  • 35. 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.
  • 36. 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
  • 37. 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
  • 38. 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  Design level
  • 39. 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.
  • 40. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Classes and Objects MyClass
  • 41. 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
  • 42. 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.
  • 43. 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.
  • 44. 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.
  • 45. 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.
  • 46. 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
  • 47. 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
  • 48. 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
  • 49. 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 *
  • 50. 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 *
  • 51. 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
  • 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
  • 53. 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
  • 54. 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; }
  • 55. 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 {}
  • 56. 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
  • 57. 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
  • 58. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Role Names employed By 1 Company Person * One to Many association between company and Person Employee Employer employs
  • 59. 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
  • 60. 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.
  • 61. 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
  • 62. 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 *
  • 63. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Ternary association Publisher BookPrice PurchasedQty
  • 64. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Ternary association Publisher BookPrice PurchasedQty TotalBill | | |
  • 65. 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; }
  • 66. 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 { }
  • 67. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Approaches for identifying classes  Noun Phrase approach  Common class patterns approach  Usecase driven, sequence/ collaboration modeling approach  Classes, Responsibilities and Collaborators approach
  • 68. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Noun Phrase Approach  Proposed by Rebecca Wirfs-Broack, Brian Wilkerson and Lauren Wiener.  The requirements or Usecase  Nouns – textual description are considered to be classes  Verbs – to be methods of the classes  All plurals are changed to singular, noun are listed, divided into  Relevant Classes, Fuzzy Classes and irrelevant classes
  • 69. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Identifying Tentative Classes
  • 70. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Identifying Tentative Classes
  • 71. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Selecting Classes from the relevant and Fuzzy Categories  Redundant Classes –  do not keep two classes that express same information  Choose your vocabulary carefully  Adjective Classes  Suggest different kind of object
  • 72. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Selecting Classes from the relevant and Fuzzy Categories  Attribute Classes  Tentative objects that are used only as values should be defined or restated as attributes and not as class  Irrelevant Classes  Class have purpose and every class should be clearly defined and necessary.
  • 73. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
  • 74. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
  • 75. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
  • 76. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
  • 77. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology
  • 78. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Approaches for identifying classes  Noun Phrase approach  Common class patterns approach  Usecase driven, sequence/ collaboration modeling approach  Classes, Responsibilities and Collaborators approach
  • 79. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology The ViaNet bank ATM System: Identifying classes by using Noun Phrase Approach  Initial List of Noun Phrases: Candidate Classes Account Cash Fund Savings account Account Balance Check Invalid PIN Step Amount Checking Message System Approval process Checking Account Money Transaction ATM Card Client Password Transaction ATM Machine Client’s Account PIN Bank Dollar PIN Code Bank Client Envelope Record Card Four Digits Savings
  • 80. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology The ViaNet bank ATM System: Identifying classes by using Noun Phrase Approach  The following irrelevant classes can be eliminated because they do not belongs to the problem statement  Envelope  Four Digits  Step
  • 81. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology The ViaNet bank ATM System: Identifying classes by using Noun Phrase Approach  Initial List of Noun Phrases: Candidate Classes Account Cash Fund Savings account Account Balance Check Invalid PIN Step Amount Checking Message System Approval process Checking Account Money Transaction ATM Card Client Password Transaction ATM Machine Client’s Account PIN Bank Dollar PIN Code Bank Client Envelope Record Card Four Digits Savings
  • 82. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Reviewing the Redundant Classes and Building a Common Vocabulary  Need to review the candidate list to see which classes are redundant  If different words are being used to describe the same idea, must select the one that is the most meaningful in the context of the system and eliminate the others.  Client, BankClient = BankClient(the term Chosen)  Account, Client’s Account = Account  Checking, Checking Account = Checking Account  Savings, Savings Account = Savings Account  ATM Card, Card = ATM Card  Fund, Money = Fund PIN, PIN Code = PIN
  • 83. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology The ViaNet bank ATM System: Identifying classes by using Noun Phrase Approach  Initial List of Noun Phrases: Candidate Classes Account Cash Fund Savings account Account Balance Check Invalid PIN Step Amount Checking Message System Approval process Checking Account Money Transaction ATM Card Client Password TransactionHist- ATM Machine Client’s Account PIN Bank Dollar PIN Code Bank Client Envelope Record Card Four Digits Savings
  • 84. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Reviewing the Classes Containing Adjectives  Again review the remaining list, now with an eye on classes with adjectives  Does the object represented by noun behave differently when the adjective is applied to it?
  • 85. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Reviewing the Possible Attributes  Next review focuses on identifying the noun phrases that are attributes, not classes.  Noun phrases used only as values should be restated as attributes.  This process also will help us identify attributes of the classes in the system.  Amount : A value, not a class.  Account Balance : An attribute of the Account Class  Invalid PIN : It is only a value, not a class  Password : An attribute, possibly of the BankClient class.  Transaction History : An attribute, possibly of the Transaction class.  PIN : An attribute, possibly of the BankClient class.
  • 86. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology The ViaNet bank ATM System: Identifying classes by using Noun Phrase Approach  Initial List of Noun Phrases: Candidate Classes Account Cash Fund Savings account Account Balance Check Invalid PIN Step Amount Checking Message System Approval process Checking Account Money Transaction ATM Card Client Password TransactionHist- ATM Machine Client’s Account PIN Currency Bank Dollar PIN Code Bank Client Envelope Record Card Four Digits Savings
  • 87. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Reviewing the Class Purpose  Identifying the classes that play a role in achieving system goals and requirements is a major activity of object oriented analysis.  Each class must have a purpose  Every class should be clearly defined and necessary in the context of achieving the system’s goals  If you cannot formulate a statement of purpose for a class, simply eliminate it.  The classes that add no purpose to the system have been deleted from the list
  • 88. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Common Class Patterns Approach  Based on a Knowledge base of the common Classes  Proposed by Shlaer, Mellor  Complied and listed pattern for finding the candidate class & Object  Name. Concept Class  Context. It encompasses principles that are not tangible but used to organize or keep track of business activities or communications.  Example. Performance is an example of concept class object  Name. Event Class  Context. Event classes are points in time that must be recorded. Things happen, usually to something else at a given date and time or as a step in an ordered sequence.  Example. Landing, interrupt, request and order are possible events
  • 89. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Common Class Patterns Approach  Name. Organization Class  Context. An organization class is a collection of people, resources facilities, or groups to which the users belong.  Example. An accounting department might be considered a potential class  Name. People Class  Context. The people class represents the different roles users play in interacting with the application.  Example. Employee, client, teacher and manager are examples
  • 90. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Common Class Patterns Approach  Name. Places Class  Context. Places are physical locations that the system must keep information about.  Example. Buildings, stores, sites, and offices are examples of places.  Name. Tangible things and devices class  Context. This class includes physical objects or groups of objects that are tangible and devices with which the application interacts.  Example. Cars are an example of tangible things and pressure sensors are an example of devices
  • 91. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Common Class Patterns Approach  Name. Places Class  Context. Places are physical locations that the system must keep information about.  Example. Buildings, stores, sites, and offices are examples of places.  Name. Tangible things and devices class  Context. This class includes physical objects or groups of objects that are tangible and devices with which the application interacts.  Example. Cars are an example of tangible things and pressure sensors are an example of devices
  • 92. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Usecase Driven Approach  Identifying Classes and their Behaviors through Sequence/Collaboration Modeling  Implementation of Scenarios  Decomposing a Use-Case Scenario with a Sequence Diagram
  • 93. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Classes, Responsibilities and Collaborators
  • 94. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Classes, Responsibilities and Collaborators Process
  • 95. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Classes, Responsibilities and Collaborators :- Example ViaNet Bank ATM System
  • 96. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Naming Classes  Name should b singular  Use general name with user or client comfortable  Name should reflect its intrinsic nature  Use Readable names  Capitalize class names
  • 97. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Class Associations and Identification of Associations  Association represent a physical or conceptual connection between two or more objects  Identify association  Is the class capable of fulfilling the required task by itself?  If not, what does it need?  From what other class can it acquire what it needs?  Guidelines for identifying association  Common Association Patterns-Location,Communication
  • 98. 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
  • 99. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Generalization
  • 100. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Guidelines for Generalization/Specialization Relationship  Top-down – noun phrased composed of various adjectives  Bottom Up – similar attribute or method  Reusability- move attribute and behavior (methods) as high as possible in the hierarchy  Multiple inheritance – Avoid excessive use of multiple inheritance.
  • 101. Software Engineering Modeling and Design Object Oriented Analysis Mr. N. L. Shelake Department of Information Technology Aggregation and Composition Relationships  A-Part-of Relationship  Represent a situation where a class consists of several component classes  Transitivity – if A is part of B and B is Part of C, then A is part of C  Antisymmetry – if A is part of B then B is Not Part of A  Does part class belong to a problem domain?  Is the part class within the system’s responsibilities?  Does the part class capture more than a single value?  Does it provide a useful abstraction in dealing with the problem domain?
  • 102. 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.