12
h t eoretical www actical pr gr ing pro amm lan ages gu t algori hms data structures plied ap databases so twar f e gineerin en g technical ompute c r nc scie e Object-Oriented Analysis and Design Arpita Gopal Netra Patil method 1 method 8 method 2 method 7 attribute 1 attribute 4 method 3 method 6 method 4 method 5 attribute 2 attribute 3 Class

Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

  • Upload
    others

  • View
    47

  • Download
    15

Embed Size (px)

Citation preview

Page 1: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

ht eoretical

www

acticalpr

gr ingpro amm

lan agesgu

talgori hms

data

structures

pliedap

databases

so twarf e

gineerinen g

technical

omputec r

ncscie e

Object-OrientedAnalysis and Design

Arpita Gopal Netra Patil•

method 1 method 8

method 2 method 7attribute 1 attribute 4

method 3 method 6

method 4 method 5

attribute 2 attribute 3

Class

Page 2: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

����������������������� �������

��� �����

������� ���Director–MCA

Sinhgad Institute of Business Administration and ResearchPune

� ���� �����Assistant Professor

Sinhgad Institute of Business Administration and ResearchPune

New Delhi - 1100012011

Page 3: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

MAGNIFYING OBJECT-ORIENTED ANALYSIS AND DESIGNArpita Gopal and Netra Patil

© 2011 by PHI Learning Private Limited, New Delhi. All rights reserved. No part of this book may be reproduced in any form, by mimeograph or any other means, without permission in writing from the publisher.

ISBN-978-81-203-4068-8

The export rights of this book are vested solely with the publisher.

Published by Asoke K. Ghosh, PHI Learning Private Limited, M-97, Connaught Circus, New Delhi-110001 and Printed by Baba Barkha Nath Printers, Bahadurgarh, Haryana-124507.

Page 4: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

ToShri M.N. Navale

The Visionary

Founder PresidentSinhgad Technical Education Society

Pune, Maharashtra

India

Page 5: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books
Page 6: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

��������

Preface ....................................................................................................................................... xiii

CHAPTER 1: SYSTEM ANALYSIS AND DESIGN .................................................. 1–14

1.1 Introduction ........................................................................................................................ 11.2 Software Development Models ......................................................................................... 2

1.2.1 Waterfall Model ................................................................................................... 21.2.2 The Incremental Model ....................................................................................... 31.2.3 Spiral Model ......................................................................................................... 4

1.3 Software Development Techniques .................................................................................. 51.3.1 Prototyping ........................................................................................................... 51.3.2 Clean-room Technique......................................................................................... 61.3.3 Object-Oriented Technique .................................................................................. 6

1.4 Structured Systems Analysis and Design (SSAD) .......................................................... 81.4.1 Features of SSAD ................................................................................................ 91.4.2 The Traditional Way of Programming—Structured Programming ................ 101.4.3 SSADM Disadvantage ....................................................................................... 121.4.4 Why is SSADM not Evacuated? ...................................................................... 12

1.5 Object-Oriented Analysis and Design (OOAD) ............................................................ 121.5.1 The New Way of Programming—The Object-Oriented Approach ................ 131.5.2 Why an OOAD over SSADM? ........................................................................ 131.5.3 Contribution of Object-Oriented Methodology towards SDLC ...................... 14Exercises .......................................................................................................................... 14

CHAPTER 2: OBJECT ORIENTED ANALYSIS AND DESIGN ......................... 15–24

2.1 Object-Oriented Modelling ............................................................................................. 152.1.1 Analysis Model .................................................................................................. 152.1.2 Architecture Model ............................................................................................ 152.1.3 Component (Design) Models ............................................................................ 15

2.2 Object-Oriented Approach .............................................................................................. 162.2.1 Object Orientation .............................................................................................. 162.2.2 Object-Oriented Analysis ................................................................................... 172.2.3 Object-Oriented Design ..................................................................................... 18

Page 7: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

�� ��������

2.3 The Constituents of OOAD ............................................................................................ 182.3.1 Objects and Classes ........................................................................................... 182.3.2 Links and Association ....................................................................................... 192.3.3 Generalization and Specialization ..................................................................... 192.3.4 Aggregation and Composition .......................................................................... 20

2.4 Pillars of Object Oriented Analysis and Design ........................................................... 202.4.1 Abstraction .......................................................................................................... 202.4.2 Encapsulation...................................................................................................... 202.4.3 Inheritance .......................................................................................................... 212.4.4 Polymorphism ..................................................................................................... 212.4.5 Coupling ............................................................................................................. 212.4.6 Cohesion ............................................................................................................. 222.4.7 Components ........................................................................................................ 222.4.8 Interfaces ............................................................................................................ 22

2.5 The Language of OOAD—Unified Modelling Language and BPMN ........................ 222.5.1 UML Diagrams .................................................................................................. 232.5.2 Introduction to BPMN ....................................................................................... 24Exercises .......................................................................................................................... 24

CHAPTER 3: BUSINESS PROCESS DIAGRAM AND USE CASE DIAGRAM ......25–47

3.1 Introduction to Business Process Diagram .................................................................... 253.2 Scope of Business Process Diagram .............................................................................. 253.3 Elements of Business Process Diagram ......................................................................... 26

3.3.1 Flow Objects ...................................................................................................... 263.3.2 Connecting Objects ............................................................................................ 283.3.3 Swimlanes ........................................................................................................... 283.3.4 Artifacts .............................................................................................................. 30

3.4 Guidelines for Design of Business Process Diagram ................................................... 313.4.1 Finding out Elementary (Atomic) Processes and Complex (Non-atomic)

Processes ............................................................................................................. 313.4.2 Example Explaining Elementary and Complex Processes .............................. 313.4.3 Represent Processes along the Pools and Lanes ............................................. 323.4.4 Check for Consistency within the Diagram..................................................... 323.4.5 Analyze the Level of Interaction ...................................................................... 32

3.5 Case: Get-Well-Soon Hospital Pvt. Ltd. ....................................................................... 323.5.1 Swimlanes ........................................................................................................... 333.5.2 Flow Objects ...................................................................................................... 343.5.3 Artifacts .............................................................................................................. 353.5.4 Business Process Diagram................................................................................. 36

3.6 Use-Case Diagram ........................................................................................................... 363.7 Scope of Use-Case Diagrams ......................................................................................... 363.8 Benefits of a Use-Case Diagrams .................................................................................. 38

Page 8: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

�������� ���

3.9 Elements of Use-Case Diagram ..................................................................................... 393.9.1 Actors .................................................................................................................. 393.9.2 Use-Cases ........................................................................................................... 393.9.3 Relationships between Actor and Use Case .................................................... 403.9.4 Relationships between Use-Cases ..................................................................... 403.9.5 Relationships between Actors ........................................................................... 42

3.10 Guidelines for Design of Use-Case Diagrams .............................................................. 423.10.1 Actors .................................................................................................................. 423.10.2 Use-Case ............................................................................................................. 423.10.3 Relationships ...................................................................................................... 423.10.4 System Boundary Box ....................................................................................... 43

3.11 Case Merchant National Bank ........................................................................................ 433.11.1 Identifying Actors and Use-Cases .................................................................... 433.11.2 Use-Case Diagram ............................................................................................. 43Exercises .......................................................................................................................... 45

CHAPTER 4: CLASS DIAGRAM AND OBJECT DIAGRAM.............................. 48–66

4.1 Class Diagrams ................................................................................................................ 484.1.1 Analysis and Design Versions of a Class Diagram ........................................ 48

4.2 Elements of Class Diagram ............................................................................................ 494.2.1 Class .................................................................................................................... 494.2.2 Relationships ...................................................................................................... 504.2.3 Association Class ............................................................................................... 554.2.4 Interface .............................................................................................................. 564.2.5 Package ............................................................................................................... 58

4.3 Guidelines for Design of a Class Diagram ................................................................... 584.4 Problem Statement: Merchant National Bank ............................................................... 58

4.4.1 Analysis of Merchant National Bank ............................................................... 594.4.2 Class Diagram—Merchant National Bank ....................................................... 61

4.5 Object Diagram ................................................................................................................ 624.6 Elements of Object Diagram .......................................................................................... 62

4.6.1 Objects ................................................................................................................ 624.6.2 Links ................................................................................................................... 63

4.7 Guidelines for Design of Object Diagrams ................................................................... 634.8 Problem Statement: ABC India Pvt. Ltd. ...................................................................... 63

4.8.1 Analysis of ABC India Pvt. Ltd. ...................................................................... 634.8.2 Object Diagrams for ABC India Pvt. Ltd. ...................................................... 64Exercises .......................................................................................................................... 65

CHAPTER 5: SEQUENCE DIAGRAM AND COLLABORATION DIAGRAM .... 67–81

5.1 Introduction to Sequence Diagram ................................................................................. 675.2 Elements of Sequence Diagram ..................................................................................... 68

5.2.1 Life Lines ........................................................................................................... 685.2.2 Messages ............................................................................................................. 68

Page 9: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

���� ��������

5.2.3 Activation ........................................................................................................... 695.2.4 Guards ................................................................................................................. 695.2.5 Combined Fragments ......................................................................................... 705.2.6 Objects .................................................................................................................. 72

5.3 Guidelines for Design of Sequence Diagrams .............................................................. 745.4 Problem Statement: Milton Jewels Pvt. Ltd. ................................................................. 75

5.4.1 Analysis of Milton Jewels Pvt. Ltd. ................................................................ 755.4.2 Sequence Diagrams: Milton Jewels Pvt. Ltd. .................................................. 76

5.5 Collaboration Diagram .................................................................................................... 775.6 Elements of Collaboration Diagram ............................................................................... 78

5.6.1 Links ................................................................................................................... 785.6.2 Messages ............................................................................................................. 785.6.3 Objects ................................................................................................................ 78

5.7 Guidelines for Design of Collaboration Diagrams ....................................................... 795.8 Problem Statement: Milton Jewels Pvt. Ltd. ................................................................. 79

5.8.1 Analysis of Milton Jewels Pvt. Ltd. ................................................................ 795.8.2 Collaboration Diagram: Milton Jewels Pvt. Ltd. ............................................ 79Exercises .......................................................................................................................... 80

CHAPTER 6: ACTIVITY DIAGRAM AND STATE CHART DIAGRAM ......... 82–97

6.1 Introduction to Activity Diagram ................................................................................... 826.2 Elements of Activity Diagram and their Notation ........................................................ 82

6.2.1 Initial State ......................................................................................................... 826.2.2 Final State .......................................................................................................... 836.2.3 Action/Activity ................................................................................................... 836.2.4 Transitions .......................................................................................................... 836.2.5 Decisions ............................................................................................................ 846.2.6 Synchronization, Fork and Join ........................................................................ 846.2.7 Swimlanes ........................................................................................................... 856.2.8 Objects and Object Flows ................................................................................. 86

6.3 Guidelines for Design of Activity Diagram .................................................................. 866.4 Problem Statement: MCA Admission System .............................................................. 87

6.4.1 Analysis of MCA Admission System .............................................................. 876.4.2 Activity Diagrams: MCA Admission System .................................................. 88

6.5 Introduction to State Chart Diagram.............................................................................. 896.6 Elements of State Chart Diagram and their Notation .................................................. 90

6.6.1 Initial State ......................................................................................................... 906.6.2 Final State .......................................................................................................... 906.6.3 State .................................................................................................................... 906.6.4 Transitions .......................................................................................................... 93

6.7 Guidelines for Design of Statechart Diagram ............................................................... 946.8 Problem Statement: Advertisement Campaign of ABC Pvt. Ltd. ............................... 95

6.8.1 Analysis of Advertisement Campaign of ABC Pvt. Ltd. ............................... 956.8.2 State Chart Diagram for Advertisement Campaign of ABC Pvt. Ltd. .......... 96Exercises .......................................................................................................................... 97

Page 10: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

�������� ��

CHAPTER 7: COMPONENT DIAGRAM AND DEPLOYMENT DIAGRAM ..... 98–111

7.1 Introduction to Component Diagram ............................................................................. 987.2 Elements of Component Diagram and their Notation .................................................. 98

7.2.1 Components ........................................................................................................ 987.2.2 Interfaces .......................................................................................................... 1007.2.3 Dependencies .................................................................................................... 1027.2.4 Port .................................................................................................................... 102

7.3 Guidelines for Design of Component Diagram .......................................................... 1037.4 Problem Statement: GlobalTherm USA Pvt. Ltd. ....................................................... 104

7.4.1 Analysis of GlobalTherm USA Pvt. Ltd. ...................................................... 1047.4.2 Component Diagram for GlobalTherm USA Pvt. Ltd. ................................. 105

7.5 Introduction to Deployment Diagram .......................................................................... 1057.6 Elements of Deployment Diagram and their Notation ............................................... 106

7.6.1 Node .................................................................................................................. 1067.6.2 Component ........................................................................................................ 1067.6.3 Artifacts ............................................................................................................ 1067.6.4 Link ................................................................................................................... 1077.6.5 Dependency ...................................................................................................... 107

7.7 Guidelines for Design of Deployment Diagram ......................................................... 1077.8 Deployment Diagram for Web-Based Application ..................................................... 108

7.8.1 Simplified Deployment Diagram .................................................................... 1087.8.2 Detailed Deployment Diagram ........................................................................ 108

7.9 Problem Statement: John and Tom’s Online Beverages ............................................ 1087.9.1 Analysis of John and Tom’s Online Beverages ............................................ 1107.9.2 Deployment Diagram for John and Tom’s Online Beverages ..................... 110

7.10 Simplified Deployment Diagram for 2-Tier Architecture ......................................... 110Exercises ........................................................................................................................ 111

CHAPTER 8: CASE STUDY—STUDENT LOAN SYSTEM ............................. 112–148

8.1 Problem Statement: Student Loan System .................................................................. 1128.2 Analysis Phase Diagrams: Student Loan System ....................................................... 112

8.2.1 Business Process Diagram............................................................................... 1138.2.2 Use-Case Diagram ........................................................................................... 1168.2.3 Class Diagram .................................................................................................. 1188.2.4 Object Diagram ................................................................................................ 120

8.3 Design Phase Diagrams: Student Loan System .......................................................... 1208.3.1 Sequence Diagram ........................................................................................... 1208.3.2 Collaboration Diagram..................................................................................... 1348.3.3 Statechart Diagram ........................................................................................... 1418.3.4 Activity Diagrams ............................................................................................ 143

8.4 Implementation Phase Diagrams: Student Loan System ............................................ 1448.4.1 Component Diagram ........................................................................................ 1448.4.2 Deployment Diagram ....................................................................................... 147

Page 11: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

continue

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #

PRODUCT NOT FOUND!

Product not found!

Products By Alphabet

School BooksOswaal BooksClass 9th BooksClass 10th BooksClass 11th BooksClass 12th Books

Engineering BooksRGPV Books & NotesVT U Books & NotesFree Engineering BooksInformation T echnology BooksElectrical Engineering Books

Competitive ExamsBank PO Exam

Login | Register 0

Search by Title / Author / ISBN / Description

Page 12: Object-Oriented Analysis and Design - KopyKitab€¦ · 2.4 Pillars of Object Oriented Analysis and Design ... 7.8 Deployment Diagram for Web-Based Application ... Engineering Books

Gate BooksT eaching Exams BooksAIEEE-NIT -JEE MAINS BooksUPSC Books

Professional CoursesICSI Books & Study MaterialsChartered Accountant BooksCompany Secretary BooksICSI 7 days T rialLatest Scanners

About KopyKitab.com

Kopykitab is India's 1st digital & multiple publishers platform. Kopykitab has largest collection of e-textbooks &branded digital content in Higher & School education. We have strong foundation of leading publishers &tutorials as content partners.

We offer e-textbook, Test Preparation, Notes & LMS for various curriculam to Students, Professionals &Institutes. These are same textbooks, way smarter. Our goal is to make education affordable & accessible.A user can access the content in all electronic devices e.g. Mobile, PC & Tabs

Informat ion

About Us

FAQ

Privacy Policy

T erms & Conditions

Payment Information

Links

ICSI eLibrary

KopyKitab eBook Reader

Contact Us

Site Map

My Account

Refer & Earn

My Account

Order History

Wish List

Newsletter

My Library

Office 365 Email Login

Verified By

©2016 DigiBook Technologies (P) Ltd, All Rights Reserved. An ISO 9001:2008 Certified Company