CS8592 - Object Oriented Analysis and Design.
CS8592 - Object Oriented Analysis and Design.
Object Oriented
Analysis & Design
Mrs. Anuradha A. Puntambekar
M.E. (Computer)
Formerly Assistant Professor in
P.E.S. Modern College of Engineering,
Pune
® ®
TECHNICAL
PUBLICATIONS
SINCE 1993 An Up-Thrust for Knowledge
(i)
Object Oriented Analysis & Design
Subject Code : CS8592
Published by :
® ®
TECHNICAL Amit Residency, Office No.1, 412, Shaniwar Peth,
Pune - 411030, M.S. INDIA, Ph.: +91-020-24495496/97
PUBLICATIONS
SINCE 1993 An Up-Thrust for Knowledge Email : [email protected] Website : www.technicalpublications.org
Printer :
Yogiraj Printers & Binders
Sr.No. 10\1A,
Ghule Industrial Estate, Nanded Village Road,
Tal-Haveli, Dist-Pune - 411041.
ISBN 978-93-89420-90-6
9 789389 420906 AU 17
Inception
Elaboration
Construction Phases
Transition
Actors
Production Unified Process
Scenarios
Business Modeling
Use Cases
Requirements Analysis and Gathering
Discipline Use Case Diagram Use Case Models
Design
Include
Implementation
Relationships Extend
Generalization
Unified Process and
Use Case Diagrams
Class Diagram
Object Diagram
Basic Concept of OOAD Component Diagram
State Diagram
Activity Diagram
Deployment Diagram
Package Diagram
Mind Map : Chapter 2 : Static UML Diagrams
Realistic Testing Key Ideas and Practices Notes, Constraints and Methods
Elaboration
Detailed Design of Use Cases Stereotypes, Profiles, and Tags
Dependency
Symbol Class Diagram
Interface
Intension Conceptual Classes Constraints
Extension Static UML Diagrams Association Classes
Qualified Association
Sequence Diagram
Interaction Diagram
Collaboration Diagram
Examples
Dynamic and
Objects and Links
Implementation Domain Layer
Messages and Stimulus UML Diagram
Collaboration Diagram Logical Architecture with Layers Application Logic Layer
Active Objects
Package Diagram Domain Object
Examples
Model View Separation
Examples
States and Transitions
Swimlane
Examples
Mind Map : Chapter 4 : Design Patterns
Basic Concept
Creator
Collection Classes in Code
Information Exprert GRASP
Mapping Design Exception and Error Handling
Low Coupling GRASP Patterns
to Code Order of Implementation
High Cohesion
Test Driven Development
Controller
Design Patterns
Adapter Pattern
Pattern Name
Singleton Pattern
Problem Applying GOF Pattern
Factory Pattern
How to Write Pattern
Solution
Observer Pattern
Consequences
Bridge
Structural Design Pattern
Types of Design Pattern Adapter
Strategy
Behavioural Design Pattern
Observer
Mind Map : Chapter 5 : Testing
Implication of Inheritance
Method Testing
Rambaugh's OMT Model
Class Testing
Object Oriented Levels of Object Oriented Testing
Booch's Methodology
Methodologies Integration Testing
Object Oriented Business Engineering
System Testing
Testing
Visualization Representation of
of domain domain concept in
concept object oriented language
public getCustomerInfo()
Customer { }
getCustomerInfo()
}
Inception Elaboration
Planning
Communication Modeling
Construction Construction
Deployment
Transition
Release
Software increment Production
Development cycle
Iterations
Implementation
Testing
Amount of
Deployment work done
in deployment
Change management phase
Project management
Environment
Iteration
Online Cake Store
Add Cake to
Cart
Change Quantity
of added cakes
Customer
Cancel Order
Checkout
Conceptual
Bank Customer perspective
(domain value)
1 has 2
Account_No
Bank Specification
Customer or
Customer 1 implementation
1 2 perspective
Customer 2 Account_No: int
getAcctNo: int
Show_database()
Concerns: Concern : system
Functionality, Configuration and assembly
vocabulary Users : Programmer
Users : End user, tester
Class, Diagram,
Deployment
Composite structure,
Diagram
Object Diagram
Submits
<<include>>
form
User
Validate
customer
System
Invalid login
<<extend>>
logs in
<<include>> <<include>>
Include relationship
Actor Enters Enters
username password
Issue book
Borrower Issue Magazine
Generalization
Librarian
Issue item
<<include>>
Student Staff
Check availability
return Book
<<extend>>
pays fine
Extended relationship
System
Session
Customer
Insufficient
<<include>> balance
<<include>>
<<extend>>
Dispense money Check account balance
Place Order
<<include>>
<<include>>
<<include>>
Enter
Enter items and
Enter
Account Quantities
name and
number
password
Invalid Input
<<extend>>
Validate Input
User
Update
Database
Admin
General
Receipt
<<include>>
total
<<include>> <<include>> cost
expected
Order no. ship date
Display Receipt
<<Include>>
Pay For Product
<<include>>
<<include>>
<<include>>
Cash Payment Cheque Payment
Customer
Credit Payment
Browse
–––––––––
Name
Product ID
<<extend>> <<extend>>
(Name) (Product ID)
Customer
Browse by Browse by
Name Product ID
<<extend>>
Place an
order
Place Place
Customer order by order by
telephone internet
Schedule
Make appointment
Registration extension point
<<extend>>
Doctors Availability
<<include>>
Make Patient
Admission
<<include>>
Ward Allotment
View Menu
+place order
+makes payment
Serve Food
Cook Food
Chef
Eat Food
+receive order
Name
Branch
City
1
has
0
Customer Account
1 has 1
Name Status
Address
Account_No
Savings Current
Title
ISBN Symbol
Issue_Date
Return_Date
Book_1
Book_3 Extention
Book_2
Book_4
Patient
+Name This is worst way
+Name of Test of representing the
+Date class
+Name of Doctor
+Description of test
+Results
Test
+Name Patient This is better way
+Name of Test Conducted for of representing the
+Date +Name classes
+Name of Doctor * *
+Description of Test
+Results
Account
Customer
has +Type This is worst way
+Name +BranchName of representing the
1 class
+AccNumber
Account
This is better way
+Type of representing the
+BranchName class
Described by
1
Customer AccountDescription
has
+Name 1 +AccNumber
Customer ATM Console
Patient
AdministrativeStaff
Receptionist
Test
Doctor
Nurse
Attributes
Flight
+Name: FlightName
–/DateTime: Date
Derived Attributes
Flight
+Name: FlightName[0..1]
–/DateTime: Date
– denotes private visibility Multiplicity can be
+ denotes public visibility denoted (optional)
Customer
It should not be
+Name attribute
Worse
+AccNumber
Customer Account
Has
Better +Name +AccNumber
1 1
Patient
+Name
Worse
+TestName
Patient Test
Undergoes through
Better +Name +TestName
1
Item Weight
Has
+Quantity: Number +
1
Association Relationship
between two classes
Account
Customer
Has +Type
+Name +BranchName
1
+AccNumber
Librarian Issues Library Card
1
Teacher Subjects
Class Teaches
diagram 1 1
Car Steering
– session
Protected – card no
– pin
+ time
1
Contains
1
ATM
Customer Cash Dispenser Cash
Operates +ATMID Contains Dispenses
+Name +BankName
1 1 1 +DateTime 1 +Amount
+AccNumber +BranchName
+Address
1
Inserts 1
Creates
1
ATM Card Session Transaction
Establishes +SessionID Has
+CardID +Type
+Type 1 +DateTime
+Amount
+Is of type
Is of type
+Is of type
Withdrawal Deposit
Balance Enquiry
ATM
Session
Transaction
Card Card
–number Establishes –ATMID
1 1 –PIN
–SessionState
Card Card
–number currentSession –ATMID
1 –PIN
+Card(int number) –SessionState
+getCardNo()
+Session()
+PerfromSession()
+setPIN()
Patient Test
+Name +TestName Attribute text
Patient Test
TestName
+Name Association Line
1
Patient Test
Test Conducted
+Name +TestName Both
1
Association line Class name
<<computer>>
vendor = "DELL"
processor = "intel" Tagged values
memory = "4GB"
INSPIRON
Account
Generalization
Student Teacher
–Class: String –Salary
–Marks
+Registers() +Registers()
Client Supplier
Order Item
<<use>>
Database Connection
<<create>>
<<interface>>
Search Engine
Search Web Page
Dependency Notation
Search Engine
Search Web Page
... Display
getpg ()
... Display
getpg ()
Lollipop Notation
Car DVD Player
ATM System
+insert(item)
+delete(): int {
postcondition:front = front–1
}
Course Student
StudentID : int
1 1
Course
Student
–CourseName
–Name –CourseID
–StudID +Enrolls for
–Fee
–Address
+Allocate_Student()
+Check_Eligibility()
+Cancel_Allocation()
+SelectCourse()
+Update_Course
Enrollment
–Marks
+Calculate_Avg_Marks()
ServiceResourse 1
Underlined object
+instance : ServiceResourse
indicates that it is
a static member
–getInstance(): ServiceResource
T
<<interface>>
List
List<T–>Student>
T
<<interface>>
List
DisplayList(item:T):void
<<bind>>T–>Student
StudentList
StudentList
–name:String
–ID:int
+Getdetails()
+DisplayList()
Exception Thrown
IOException
Responsibilities
Serialize and
deserialize the objects
Class 1
CommandProcessor
<<interface>>
run()
run()
File System
1
Disc * File
*
+capacity *
+create()
+compress()
1 * * +delete()
* +rename()
0..1 * +copy()
Drive tracks
+driveletter
name
purpose
author
compile
link
execute
debug
1
*
Statement
Expression Function
String 1 1
evaluate 1 1
ArgumentList ReturnType
noofArguments DataType
RelationalOperator ArithmeticOperator
Car 1 Car Dealer
Owns
*
* Model year Sells
1 1
Lien
Owner
name 1 Borrows *
address
* Car Loan
AccountNo.
RateofInterest
Balance
*
Person Company Bank
Provides
email Phone Branch
** 1
Drawing Object *
2..
0..1
Text Geometric Object Group
Point Polygon
*
Paragraph
Copy
*
Character
Copy
Project Student
1 3...5
1...3
1 Guide
Student
Project Student
Project
name = "RR"
Title = "AAA" name = "M"
Title = "BBB"
Guide
name = "ABC"
University
+has +has
* *
Room Department
+ID +name
+has 1
1..*
Classroom Office Person
+no_of_seats +ID
+name +is enrolled
1
+works in
1..* *
Employee Professor
Country Citizen
+has
1 1..*
Country Citizen
1 +has
Adhar ID
1
Qualifier Multiplicity
reduced to 1
Customer + orders ElectronicGadget
LCD TV LED TV
Book
Sections
User
ID
Name
Email
Chairperson Attendee
attendance_type Meeting_Entry
Meeting_date attendance_status
Meeting_Time
Meeting_Location
Attendance_List
meeting
Room
Meeting_ID
Agenda Room_No
Scheduler
Data
Date Time
Time Duration
Location
Shape
OpenShape ClosedShape
Library Card
Card Reader +CardNo
+ Model +ExpiryDate
+ ReadCard() +BorrowBook()
+has
Library Librarian
Student +Name
+visits +CollegeName
+Student D +Phone
+Name +Qualifiction
+Class +ManageTransaction()
+Address +AccessDatabase()
+issue_ Book() Association +Update Database()
+Return_Book()
Book Magazine
+Title +Name Aggregation
New Member Existing Member +ISBN +Year
+Author +Status()
+Publisher
+Edition
+Status()
+headoffice
Bank
* +name
+1 +code
Branch
+Branch_ID +addBranch()
+Branch_name * 1
+getBranch()
+Address +getAllBranches()
+addAccount()
+removeAccount()
+getAccountInfo()
Account
Customer +Acc_no
+balance
+cust_ID
+Name +deposit()
+Address 1 1 +withdraw()
+Phone +getBalance()
Savings_Account Current_Account
Customer
id : int ShoppingCart
address : string 1 1 1 1
phone : int Account created : Date
email : string
id : int
scrolls() address : string 1
placesorder() open : Date
makespayment() 1
1
transaction()
Order
*
1 number : string
ordered : Date
shipped : Date
0 destination : Address
total : int
Payment
1
Responsibility- 1
-Payment details
CreditCard CashOnDelivery
Company Department
name name
addr Has
phone 1 addemp()
email 1 removeemp()
displayallemp()
addDept()
removeDept()
displayallDept() 1
Has
1
Project Employee
Assigned
with
name
details 1 1
schedule()
status()
PermanentEmp HourlyEmp
name name
id no_of_work_hours
dateofJoin
salary
<<Include>>
<<extend>>
TM
Object1
Object1 : ClassName1 Object2 : ClassName2 Object3 : ClassName3
1 : message1()
2 : message2()
3 : LoopMessage()
4 : message3()
5 : message4()
X
System
Session
<<include>>
Invalid PIN
<<extend>>
Transaction
Customer Insufficient
<<include>> balance
<<include>>
<<extend>>
Dispense money Check Account Balance
:Customer :ATM System :Bank
1 : Inserts Card()
3 : Enters PIN()
4 : Submits PIN()
5 : ?Validates PIN()
6 : Valid PIN()
7 : Selects Withdrawal()
8 : Display Menu()
9 : Enters Amount()
10 : Check Account Balance()
11 : ?Balance>Amount()
12 : Valid Amount()
13 : Dispenses Cash()
16 : Ejects Card()
ATM System
Make Deposit
<<include>> <<include>>
1 : deposit
2 : process_deposit
3 : Acknowledge
1 1/4 * 1 1/4 3
Student Course
<<association>>
Course
<<paramenter>>
<<local>>
2 : withdraw(Amount) 3 : notify()
c : Customer : Transaction : Bank
2.2 return(Amount)
connector
nested flow
2.1 checkBalance()
(a)
message
1 : submitForm() 2 : books()
p : Passenger : Reservation : Ticket
1:enterUserName()
2:enterPassword()
3:pressSubmitButton()
4:send(userName,password)
5:validation()
6:status()
7:displayValidationMessage()
user : Person
1 : enterUserName()
2 : enterPassword()
3 : pressSubmitButton()
5 : validate()
7 : displayValidationMessage()
4 : send(userName,password)
Account
GUI : Login
Manager
6 : status()
a : Caller : Switch b : Callee
PickUpReceiver
activateDialTone()
dialNumber(n)
<<create>>
c.Communication
ring()
PickUpReceiver
Connect(b, a)
Connect(a)
Connect(b)
Reservation System
7 : Eligibility Confirm()
4 : Submits Form()
1 : View Courses()
: Student
8 : Pays Fees()
: Accountant
User ATM System
1 : Insert card
2 : Validate card
3 : Valid
4 : Insert PIN
5 : Validate PIN
6 : Valid
7 : Transaction
8 : Response
Librarian MemberRecord Book Book Database
1 : Validate member
2 : Valid member
4 : Book available
8 : Update record
9 : Issue book
5 : Confirm
6 : Renewal of book
Reservation system
2 : Display()
3 : Select course()
7 : Eligibility confirm()
8 : Pays fees()
9 : Payment confirmation()
Reservation system
5 : Send for reservation()
: Registrar 2 : Display()
7 : Eligibility confirm()
9 : Payment confirmation()
3 : Select course()
1 : View courses()
: Accountant
Customer Online shopping System Credit Card Processing Bank
1 : Purchase Items()
2 : Calculate Bill()
3 : Gives Bill()
4 : Swaps Card()
5 : Verify Card()
6 : Acknowledge()
7 : Process Card()
8 : Makes Transactions()
9 : Acknowledge()
10 : Submit Receipt()
1 : Logs in()
3 : Send validity()
5 : Check availability
status()
6 : Checking Availability()
7 : Checking availablity()
9 : Progress order()
10 : Update()
11 : Update database()
12 : Generate Bill()
/Accountant
13 : Send Billing()
14 : Logs out()
User System
1 : Enters User ID
3 : validates
4 : Login Successful
/Order /Inventory Manager /Stock Maintenance /Stock Database
System
1 : Logs in()
2 : validate()
3 : Send validity()
4 : Demands items to fulfill the order()
5 : Check availability status()
6 : Checking Availability()
7 : Checking availability()
9 : Process order()
10 :Update()
11 : Update database()
12 : Generate Bill()
/Accountant
13 : Send Billing()
14 : Logs out()
Employee Admin Database
3 : acknowledge
7: Calculate Salary
Perform startup
Idle Active
Initial state
Transition
Transition action
Complete/Glow indicator
Reading card Requesting PIN
[Valid Card]
Guard condition
Active
Idle
Reading card Complete
Perform
shutdown Complete
PIN
Requesting PIN Validating PIN
Validating
Inserts card Complete/Glow indicator
Request for Insert card Reading Card
Select cancel
Playing announcement
Call detected/answer Call
Hung up and Shut off do/play announcement
Announcement
completes
Caller hangs up
Recording
do/record message
action
door opened door closed Interrupted
door open
alarm
Door Open
timed out
Completion
CookingComplete transition
request
Idle
Moving
appropriateFloor / stop
Stepping
stopped / opendoor
Door open
Door opened
Arrived At
Floor
Idle
Clear
attention
Clear
Fire detection Alarm Command intruder detection Alarm
is submitted
Active Active
Calling Calling
waiting entry / waiting entry /
fireBrigade policeStation(s)
On
Working
Finished Load and
printing print
papers
Full tray
Load Low
papers message
Low
Push off button
Tray tray
empty
Display time
do/display hrs & min
Set Hours
B/advance hour
do/display hours
Set Minutes
do/display hours B/advance hour
A
Inserting coin
Insufficient amount
Make coffee
Cup of coffee
Simple action
Pay Bill
x : = eval(a + b) expression
Purchase item() Generate code()
Initialization
Selects transaction
Flow
Enters Amount
Completion
Activity edge
Object
Flow
Action1 [choice 1]
[choice 2] [choice 3]
Action2 Action4
Action3 [choice 3]
[Order]
Action1
Action1 [choice 1]
[choice 2] [choice 3]
Action2 Action4
Action3 [choice 3]
[condition is true] Action on
True
Action of
[condition is false] False
Receive Order
[ Order Accepted ]
fork
Accept Payment
join
Dispatch Order
Close Order
swimlane
Receive Order
[ Order Rejected ]
[ Order
Accepted ]
Submit order
Send Invoice
Accept Payment
Dispatch Order
Close Order
Finance Customer Service Order Fulfillment
Receive Order
o : Order
[in progress]
[ Order Rejected ]
[ Order Accepted ]
object
Submit order flow
o : Order
[rejected]
i : Invoice
[ unpaid ]
Send Invoice
object
flow Invoke Shipping Service
Accept Payment
i : Invoice
[ paid ]
state
o : Order
[fullfilled]
Dispach Order
Close Order
Logs in
[not available]
[available]
Borrow book
Object with
[Book] the current
state
[issued]
[Valid] [Invalid]
Select the test
Logs out
Inventory manager Stock maintenance system Stock database
Logs in
Checking availability
[Not available]
Purchase items
(Available)
Stock available
Logs out
Customer Credit card processing system Bank
Process card
Make
Print receipt
signature
Eject card
Customer Sales Department Customer Support Engineering Mail Department Accounting
Suggest Options
Discuss Options
Choose DVD
Ship DVD
Receives DVD
Makes Payment
Receives Payment
Read Attendance
Record
Award Award
minimum minimum
5 marks 10 marks
Read Assignment
Completion Record
other
logs in
submits document
Document
Submits form Verification and Form
validation
Verify applicant
Acknowledge Status
successful verification
Issue Passport
Customer Agent Insurance Comparies
Validate Form
Quotation
Send Quotations
Analyse [before
to agent
analysis]
Accept Policy
Select and Submit
Best Policy
UI
Technical Services
Domain::Purchase
User Interface
ATMMAIN
ATMAPPlet
Domain
Session Dispenser
Transaction
Banking
It consists of GUI windows,
report, speech interfaces,
UI Web pages.
Range of Applicability
Presentation
Swing Text
ProcessSale
ProcessSale
console
Domain
Sales Pricing
ServiceAccess Payment
Technical Services
Persistence
Vertical Layers
Purchase Taxes Bill
Technical Services
Vertical Layers
Error Logging Access to Database
Horizontal Horizontal
partitions partitions
:Customer :ATM System
1 : Inserts Card()
3 : Enters PIN()
7 : Selects Withdrawal()
These system operations are handled by
the layers by sending messages from UI
8 : Display Menu() layer domain layer
9 : Enters Amount()
13 : Dispenses Cash()
InsertCard()
Swing EnterPin()
SelectWithdrawal()
EnterAmount()
ProcessRequestFrame
Customer
InsertCard()
EnterPin()
SelectWithdrawal()
Domain EnterAmount()
Transaction
+InsertCard()
+EnterPin()
+SelectWithdrawal()
+EnterAmoun()
GUI
User :
Interface
layer Password :
SUBMIT
Application
Authorise user Process request
logic
Storage Database
CardReader
<<client Workstation>>
:ATM Node HTTP <<server>>
:ATM Server
<<artifact>>
ATMGUIClient.exe Device Node
<<server>> SQL
:Bank Server
<<artifact>>
<<OS>>
ATMGUIClient.exe
:Windows 7
BankDB UserInterface
SQL <<Component>>
BankDB
Representing
interface
query
Receptionists checks
room availability
[room available]
Room is alloted
to patient
Get Date and Time Patient Takes sees doctor Scrolls through history
Doctor views Doctors examine
doctor's
Patient History patient
appointment
Checks patient
<<system>> SQL
<<system>> Hospital Management <<Component>>
Doctor PC System Words DB
<<Component>>
Patient case
SQL History DB
<<ClientWorkstation>>
Hospital Management <<DatabaseServer>>
System Patient History
Database
Registration
.JSP
<<PC>>
Doctor
<<artifact>>
search.dll
Registered User
<<include>> <<include>>
Browse
Manage
Borrower Books / Magazines Librarian
Makes Reservation
<<include>> <<include>>
<<include>>
Cancels Reservation Insert Item
Delete Item
Update Item
Checkout Items
Manage Titles
Returns Items
Validate Borrower
<<extend>>
Invalid Borrower
Borrower Librarian ReservationSystem
Logs in Validates
[valid]
[not valid]
Search for Item
[not available]
Reserves the Items
[available]
Issues the Item
Reservation
makes
Borrower
0 +currentDate: Date
1 +canborrow() 0
1
<<entity>> <<entity>> <<interface>>
Item 0 1 Title publisher
+id: integer +name: String
+getlendingTime()
0
1
Librarian
1 <<entity>> <<entity>>
+manageBorrowers() manages BookTitle MagazineTitle
+manageItems()
+manageTitles() +leadingTime(): 20 days +leadingTime(): 10 days
Controller
entity
class
class
Boundry
class
b : Borrower : CheckOutItemForm : CheckOutItemController Title
1 : enter Criteria()
2 : search()
3 : search(criteria)
4 : searching(criteria)
5 : getmaching(item)
6 : status()
7 : select Item()
8 : checkout(item)
Title reservation /
no_of_reserv++
Book reserved
not available
book request
Idle Checking
Title availability
book available
Title issued
Presentation
Control
Business DAO
VO
reservationhowto.hlp
ReservationSystem.exe
{Version=3.02}
TitleMgr.java TitleDao.java
Search.dll
Title.tbl
Client PC
<<artifact>>
GUI.JSP
Name_of_Node
TM
Enters Amount()
By Creator
: Customer : ATM System : Bank
Get BalanceInfo()
CheckAccountBalance()
?GetBalanceInfo()
–AccountNo –Branch
–CustomerName +CheckBalance() –Address
–Address +GetAccountNo()
+GetBalanceInfo()
+GetBalanceInfo()
New Method
Customer
Name
Bank
1 : GetBalanceInfo Branch
: Customer : Bank
GetBalanceInfo()
1:1 a=GetAccountNo
: Account Account
Type
Branch
AccountNo
Name
GetAccountNo
Customer ATMSystem Transaction
1: Enter PIN
: Customer : ATMSystem
2: Withdraw money
: Transaction
2 : Withdraw money
: Transaction
Design I
: ATMSystem
The responsibility
of "ATMSystem"
include "Withdrawal",
makeTransaction() "deposition", "enquiry".
Withdraw Money() These are
Customer unrelated responsibilities
that result in
Deposit Fund() low cohesion
Balance Enquiry()
Design II
: Balance
: ATMSystem : Withdrawal : Deposit
Enquiry
Balance Enquiry
The responsibilities
are delegated
to other classes
Card Reader
–ATMID
+CardReader()
+ReadCard()
+EjectCard()
+RetainCard()
Customer
: MainInterfaceJFrame
UI Layer
System Operation
enterPIN(PIN)?
Subsystem Class
Client Class
Facade
Subsystem Class
Pattern name
Problem
Design pattern
Solution
Consequence
Design pattern
factoryMethod : Product
MyFunction() : void
ConcreteFactory
ConcreteProduct
factoryMethod(): Product
<<interface>> <<Interface>>
Abstraction Implementor
opr :
function( ) operation( )
redefinedFunction( ) operation( )
<<Interface>>
Client Target
target
Request( )
Adapter Adaptee
adaptee
Request( ) SpecificRequest()
<<interface>>
Client IStrategy
strategy : IStrategy
algorithm( )
Implementation 1 Implementation 2
algorithm( ) algorithm( )
Observable Observer
update( ) update( )
Call for Fun()
Client Target
Adaptee
+Request()
+Fun()
adapter.Fun1() Adapter
+Fun1()
adaptee.Fun()
Adapter
+Fun1()
adapter.FunA()
adapter.FunB()
adapter.FunZ()
1
ServiceFactory
+ instance
It returns
Static unique
attribute – ServiceFactory() instance
+ getInstance()
Static
method
Bank Manager
submits the command
for account details
Client
uses
Account Class
<<interface>>
Product
Displays either
current account details
or
the savings account details
by using Current or Savings class
SchoolNotificationSystem
Student
+update()
+update() +update()
void update()
{
system.out.printIn()
schoolNotificationSystem.getNotice()
}
ATMSystem
–ATMID: int
–BankName: String
–cardReader: CardReader
–cashDispenser: CashDispenser
–console: Console
–messageLog: MessageLog
–SystemState: int
–networkToBank: NetworkToBank
+ATM(BankName, inetAddress)
+SwitchOn()
+SwitchOff()
+Startup()
+Shutdown()
+getID()
+getCardReader()
+getCashDispenser()
+getConsole()
+getMessageLog()
1 : Insert Card()
3 : Enters PIN()
4 : Submits PIN()
5 : ?Validates PIN()
7: Selects Withdrawal()
9 : Enters Amount()
Class withdrawal VI
16 : Ejects Card()
EnterAmount ()
{
if(!insufficientBalance())
system.out.printIn("Enter amount);
} Boolean insufficient Balance()
{
if(Balance>Amount)
return false ;
else
return true ;
}
ATM System
–ATMID:int
–BankName:String
–cardReader:CardReader X
–cashDispenser:CashDispenser
–cansole:Cansole 1 Has
–messageLog:MessageLog
–SystemState:int
–NetworkToBank:NetworkTOBank
+ATM(BankName, InetAddress)
+SwitchOn()
+SwitchOff()
+Startup()
+Shutdown()
+getID()
+getCardReader()
+getCashDispenser()
+getConsole()
III +get messsageLog
Customer Card Card Reader Transaction
–Name –number –ATMID
Authorised –ATMID VII
–AccountNo By +Card(int number) Reads +CardReader() –Session
–Address +getCardNo() –CardNo
1 +ReadCard()
–AccountType 1 +EjectCard() –PIN
–Branch 1 –message
V +RetainCard()
+CardNo Establishes –TransactionState
+Balance Amount 1
+time: DateTime
Session IV
+Customer() +Transaction()
+getCardNo() –ATMID
+CreateTransaction(ATMID, session, CardNo, PIN)
+setCardNo(int num) –PIN
1 +Perform Transaction()
+getBalanceAmount() –SessionState
+getMessageFromCustomer()
+setBalanceAmount(int amt) +time: DateTime
+Completes Transaction()
+Session() VI
1
Has +PerformSession()
+setPIN()
Account
–AccountNo
–PIN <<interface>> Withdrawal Deposit Balance Enquiry
IX –BalanceAmount Cash Dispenser
–Amount –Amount –CardNo
+Account –log Connects to –PIN
+Withdrawal() +Deposit()
+getAcountNo() –CashAmount
1 1 +getMessageFromCustomer() +getMessageFromCustomer() +BalanceEnquiry()
+setAccountNo(int amt) +CompleteTransaction() +CompletesTransaction()
+getPIN() +CashDispenser() +getMessageFromCustomer()
+verifyPIN(int PIN) +setInitialAmount(int amt) +CompleteTransaction
+getBalanceAmount() +CheckCashAmount(int amt) VIII
+setBalanceAmount(int amt) +DispenseCash(int amt)
<<interface>> Message Log
WithdrawalUI
+Displays
+MessageLog()
<<interface>> +EnterAmount() +DisplayLog()
Console +InsufficientBalance() +LogResponse()
+Console()
+DisplayMessage() User Interface
+ReadPIN(int PIN)
II +ReadChoiceMenu(String choice) Displayed on
+DisplayMessage()
+ReadAmount(int amt)
EnglishUI HindiUI
I
TM
1 7
2
1 7
2
d b2 4ac
x2
3
b2
3
Integration testing
Independent Dependent
class testing class testing
TM
Name
SurName FirstName MiddleName
Permanent Address
temporary Address
Country
type of Passport
Date of Birth
Documents submitted 1.
2.
3.
4.
SUBMIT CLEAR
December 2011 January 2012
# Task name Start Duration Dec. 4 Dec. 11 Dec. 18 Dec. 25 Jan. 1 Jan. 8 Jan. 15 Jan. 22 Jan. 29
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3 4 5 6
Requirement
2 gathering 11/24/2011 21 days
and analysis
Logs in
Fills up form
Passport
Submits form issuing
system
Renewal of
Issue passport
passport
Applicant
New
passport
Validate applicant
<<extend>>
Invalidity
Passport
validation
system
Logs in
Submits documents
Gives information
Submits form
[Incomplete]
Sent for completion
[valid]
[Invalid]
Pays penalty
[valid]
Issue passport
Applicant Database
+ApplicationID +Name
+Name
+DateofBirth +Store()
+Temporary Address +Update()
+Permanent Address
+Phone
+EmailID Passport Automation System
+PAN Number
+Documents +date: Date
+Username
+display_information()
+logs_in() +validate_form()
+give_information() +update_database()
+submit_documents()
+submit_form()
1 : Logs in()
2 : Validate()
3
4 : Give information()
5 : Submits_form()
7 : Verify()
8 : Get validation()
9 : Status()
10 : Status()
12 : Update()
11 : Issue passport()
8 : Get validation()
10 : Status()
Passport Issuing System /Database
12 : Update()
Enters username and password
Gives documents
Logs in Submits documents
Enter data
Fills up form
Submit form
Eligible applicant
Issue passport
UI
JSP
User Interface
Domain
Applicants Details
Renewal
Renewal Details
Technical services
Error Access to
logging Database
PoliceVerification
.dll Passport.tbl
<<ClientWorkstation>> <<DatabaseServer>>
Passport Automation SQL
System <<database>>
Oracle
Printer
Form.JSP
System
Registration form
incomplete
<<extend>>
Make registration
Invalid login
Logs in <<extend>>
Book
Search for book unavailability
<<extend>>
Existing student New student
Borrows book
Issue book
Pays fine
Update database
Order books
Remove books
from database
+logs_in()
+search_books()
+borrow_books()
+return_books()
+pays_fine()
Book
+title
+author_name
+publication
New Student Existing Student +edition
+numberofCopies
+make_registration() +Status()
Logs in
[not available]
[available]
Borrow book
Object with
[Book] the current
state
[issued]
1 : Logs in()
2 : Validate()
3
4 : Search for book()
7 : Searching()
8 : Availability status()
9 : Borrow book()
10 : Update()
11 : Issue book()
1 : Logs in() 3 4 : Search for book() 9 : Borrow book() 2 : Validate()
/Student /BookBank
10 : Issue book()
8 : Availability status()
5 : Reads book details()
7 : Searching()
6 : Search() 11: Update()
/BookBank Handler /BooksDatabase
Collect book
<<System>>
GUI.ASPX Book Bank System
GUI.ASPX
Search.dll
SQL
<<DatabaseServer>>
Books Database
<<database>>
MYSQL
System
Registration
<<include>> <<include>>
Logs in
New student Existing student
<<include>>
Validate
Admin
Gets result
Examination
Student Registration System Examination Database
[valid] [Invalid]
Select the test
Logs out
/Student /Examination /Registration /Examination
Registration Database Database
System
2 : Validate()
3 : return()
4 : logs in()
7 : update
8 : solve test()
9 : send score()
10 : display result()
11 : logout()
8 : Solve test()
/Examination Database /Student
/Registration Database
Active
Solves test
<<system>>
Exam Registration GUI.JSP
System
dll
log. eligibilityRules.dll registrations.dll
<<component>>
Examination
Database
<<ClientWorkstation>>
Exam Registration System <<DatabaseServer>>
Registrations
SQL
Database
GUI.JSP SQL
<<DatabaseServer>>
Examinations
Student Database
Account
<<artifact>>
Test.PhP
System
Logging
Item unavailability
Produce stock
summary report
Billing
Accountant
Makes payments
for inventory
purchase
Deposit money
Inventory
+item_name
+in_Stock_quantity
+total_sale
+price Order
+listof_vendors
+vendor_address +orderNo
+vendor_Phone demands for Item +deliveryDate
+purchase_pending_items +orderedBy
+totalamount
+update_inventory()
+check_status() +process_order()
+purchase_items()
+make_Bills()
+remove_items()
+generate_Stocksummary_report()
Item
Accountant +name
+brand
+name 0 +quantity
Payment +password
verifies +price
+amount
+make_Bills() +check_availability()
+makes_payment()
+deposit_money()
Logs in
Checking availability
[not available]
Purchase items
[available]
Stock available
Logs out
/Order /Inventory Manager /Stock Maintenance /Stock Database
System
1 : Logs in()
2 : validate()
3 : Send validity()
4 : Demands items to fulfill the order()
5 : Check availability status()
6 : Checking Availability()
7 : Checking availability()
9 : Process order()
10 :Update()
11 : Update database()
12 : Generate Bill()
/Accountant
13 : Send Billing()
14 : Logs out()
2 : validate()
1 : Logs in()
14 : Logs out() 7 : Checking availability()
/Stock Database
/Inventory Manager
11 : Update database()
13 : Send Billing()
/Accountant
/Order
Active
Loging Search for Item
Update Stock
Log out
entry/insert purchased item details
exit/database updated
<<System>>
<<System>> Stock Maintenance
Accounts System
<<System>>
Order Processing
System
report.dll
<<component>> SQL
search.dll
<<component>>
Stock Database
<<System>>
<<ClientWorkstation>>
Order Processing
Stock Maintenance
System
System
Search.dll
<<System>>
Accounts
Department
<<Database>>
Stock Database
Online course reservation system
Mechanical engineering
Civil engineering
System
View courses
Unavailability of course
<<extend>>
Select the course
Student Registrar
Pays fees
Accountant
Cashpayment Creditcardpayment
Cancel registration
Student Registration system Course database
Accountant Registrar
Accountant Registrar
Confirms Payment
-Fees -EligibilityCriteria
+CalculateFees() +ConfirmEligibility()
+MakeReservation()
+CancelReservation()
CreditPayment CashPayment
Student Registration system
Fills up form
Retrieve confirmation
Eligibility confirm
Pays fees
2 : Display()
3 : Select course()
7 : Eligibility confirm()
8 : Pays fees()
9 : Payment confirmation()
Reservation system
5 : Send for reservation()
: Registrar 2 : Display()
7 : Eligibility confirm()
9 : Payment confirmation()
3 : Select course()
1 : View courses()
: Accountant
Scrolling the courses Entering data
View course Select course
Fill up form
Reserves seat
UI
JSP
Domain
Course Payment
details
Course details
Technical services
Error Access to
logging database
Web service
Form processing
SQL <<component>>
course DB
<<System
ReservationSystem>> ReservationForm.JSP
<<clientworkstation>>
ReservationSystem <<DatabaseServer>>
ReservationDatabse
ReservationForm.JSP SQL
<<databse>>
MySQL
Account
<<artifact>>
FeeCalculator.exe
System
Make registration
Seat unavailable
Logs in
Registered New <<extend>>
passenger passenger
Booking clerk
<<include>>
Makes reservation
Books ticket
<<include>>
<<include>>
Search for seat <<include>>
availability Submit form
Passenger Fills up form
Update database
Makes payment
<<include>>
Validate E-payment
Banking system
Send E-ticket
<<include>>
<<include>>
Compose Email
Generate
E-ticket
Logs out
1 1
Books Cancels
1 1
1
Ticket
Booking Clerk
+date 1 Cancels 1
+passengerName +name
+passengerAge 1 1 +id
Books
+train +checkAvailability()
+source +makesReservation()
+destination +cancelsReservation()
+fareAmount
+newTicket()
+deleteTicket()
Passenger E-Ticketing System DataBase
Makes registration
[valid]
Fills up Form
Checking availability
[available]
Makes reservation
[unavailable]
Logs out
Reservation
Passenger Clerk Database Bank
Systems
1 : login()
2 : verify()
3 : verifying()
4 : valid=validation()
5 : displayInfo()
6 : fillUpForm()
7 : submitForm()
8 : validateForm()
9 : sendForm()
10 : checkSeatAvailability()
11 : getsStatus()
12 : getsConfirmation()
13 : makesPayment()
14 : validatePayment()
15 : gets status()
16 : newTicket()
17 : sendReservationInfo()
Active
logs out
<<System>> <<System>>
E-Ticketing <<System>>
Passenger
system Bank
PC
reservationform.html
SQL
<<Component>>
Search.dll
<<Component>>
Reservation
Database
<<System>> <<System>>
E-ticketing system Bank
<<Database server>>
<<System>> Reservation
Printer
Passenger PC Database
System
Add new Employee
Remove Employee
HR Manager
<<include>> <<include>>
Employee Employee
Data Entry Clerk Retiredment Leaves job
Update
Employee record
Update by Update by
name designation
Update by Employee
salary gets Transfer
Utilities
<<include>> <<include>>
generates
Report
+date
+display_employee_details() Printer
Insert new
Submit the information Send for updation
employee record
Gets
acknowledgement
/Data Entry Clerk /System /Database
1 : logs in()
2 : validate user()
3 : validating()
5 : display GUI()
7 : display form()
8 : enter information
9 : submit information()
11 : record inserted()
12 : gets acknowledgement()
13 : logs out()
3 : validating()
7 : display form()
13 : logs out()
8 : enter information
<<System>> <<Component>>
Personnel Management Employee
System Database
GUI.dll
<<Component>>
Search.dll
<<ClientWorkstation>>
Personnel Management
System
Search.dll
<<Database>>
Employee
Database
System
Select items
Submit bill
Invalid Card
Customer
Swap Card <<extend>>
Card authentication
Merchant’s
bank
<<include>> <<include>>
Capture Validate
and return
Credit card
processing
machine
Deduct bill
Submit receipt
Customer’s
bank
Makes
signature and
return
Credit Card
Credit Card
Processing
+CardNum System
+CardType reads issues
+CardNum Receipt
+ExpiryData
+CreditLimit +Read( ) +ReceiptNo
+getValidated( ) +validate( ) +Data
+PrintRecep( ) +CardNum
+CustAccNo
has
Bank
Customer +Name
+Branch
+CustID
+Name +VerifyCard()
+EmaiAddr
+CardID
+CreditPoint
+login()
+swapcard() Merchant's Bank Customer's Bank
+Signature()
+MerchantAccNo +CustAccNo
+CreditAmount() +DebitAmount()
+UpdateCreditScore()
1 : Purchase Items()
2 : Calculate Bill()
3 : Gives Bill()
4 : Swaps Card()
5 : Verify Card()
6 : Acknowledge()
7 : Process Card()
8 : Makes Transactions()
9 : Acknowledge()
10 : Submit Receipt()
Process card
Make
Print receipt
signature
Eject card
JSP
Card reader
interface
Domain layer
Transaction
Applicant's details
Make transaction
Personal info
Processing
Card processing
Technical services
Validation
Generate receipt
System
Make registration
Invalid <<extend>>
Logs in
login
New Existing
visitor visitor
Search for book
Order Logout
book
Remove
books from
database
Book
Existing visitor New visitor
+title
+makes_registration() +author
+publication
+edition
+numberofCopies
Visitor Ebook Management System BookDatabase
1 : logs_in()
2 : validate()
3
4 : search for book()
5 : search()
6 : searching()
7 : availability status()
8 : availability status()
9 : request for preview()
10 : get preview()
11
12
13 : purchase()
14 : update()
15 : provide E-copy()
logs in
logs in
not available
available
Log out Download E-book Get E-book
Preview book
Purchase book
Download E-book
logout
User interface
Preview
Domain
Technical service
Registers
logging
Reads exam
time table
User
Attends test
Recruiter
Gets result
Log out
User
Recruitment system Database
-username
-password interacts with +date accesses
-EmailID +store()
+displayGUI() +update()
-Phoneno +validate_user() +remove()
+update_database()
+register()
+logs_in()
+ submit_personalInfo()
+get_result()
Recruiter
+name
+read_information()
+schedule_exam()
+shortlist()
+generate_result()
User Recruitment system Database Recruiter
1 : Registers()
2 : logging()
3 : validated()
4 : submit resume()
5 : update()
6 : send resume()
7 : process resume()
10 : shortlisting()
11 : convey result()
12 : get result()
13 : update()
User Recruitment system
Get result
Acceptance Reading
Viewing of Appearing
of job exam
if shortlisted result for exam time, venue, date details
User interface
JSP
Domain layer
Validation
Checking
details
Technical service
Messaging Update
Company database
Contact and
requirement details
Registered User
Unified library system
Login Search
<<include>> <<include>>
Browse
Enters user Enters Manage Borrowers
name password
Manage
Borrower Books / Magazines Librarian
Makes Reservation
<<include>> <<include>>
<<include>>
Cancels Reservation Insert Item Delete Item
Update Item
Checkout Items
Manage Titles
Returns Items
Validate Borrower
<<extend>>
Invalid Borrower
Reservation
makes
Borrower
0 +currentDate: Date
1 +canborrow() 0
1
<<entity>> <<entity>> <<interface>>
Item 0 1 Title publisher
+id: integer +name: String
+getlendingTime()
0
1
Librarian
1 <<entity>> <<entity>>
+manageBorrowers() Manages BookTitle MagazineTitle
+manageItems()
+manageTitles() +leadingTime(): 20 days +leadingTime(): 10 days
1 : enter Criteria()
2 : search()
3 : search(criteria)
4 : searching(criteria)
5 : getmaching(item)
6 : status()
7 : select Item()
8 : checkout(item)
Borrower Librarian ReservationSystem
Logs in Validates
[valid]
[not valid]
Search for Item
[not available]
Reserves the Items
[available]
Issues the Item
Book reserved
not available
book request
Idle Checking
Title availability
book available
Title issued
System
Add new
student
Student Student
passed cancels
out admission
Update
student
record
Update Update
name marks
Update Update
address Update division
class
Utilities
Student <<include>> <<include>>
School authority
Student
Data Entry Clerk +direct_for_operation()
–StudentRegNo
–StudentRollNo
–Address +add_student() Printer
–Class +update_student()
–division +delete_student()
–marks search_record()
+generation_report
+search_record()
1
generates
1..*
Report
+date
+display_employe_details()
/Data Entry Clerk /System /Database
1 : logs in()
2 : validate user()
3 : validating()
5 : display GUI()
7 : display form()
8 : enter information
9 : submit information()
11 : record inserted()
12 : gets acknowledgement()
13 : logs out()
Data Entry Clerk Student Information System Student Database
Insert new
Submit the information Send for updation
student record
Gets
acknowledgement
Semester - VI (IT), Semester - V (CSE)
(20368) Regulation 2013
Semester - VI (IT), Semester - V (CSE)
(52867) Regulation 2013
Semester - V (CSE)
(90161) Regulation 2017