an a

16
Object-Oriented Analysis Building Analysis Models Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] April 17, 2012 Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 akiwelekar@gm Object-Oriented Analysis April 17, 2012 1 / 16

Upload: arvind-kiwelekar

Post on 24-Oct-2014

25 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: An A

Object-Oriented AnalysisBuilding Analysis Models

Arvind W. KiwelekarAssistant Professor

Computer Engineering Department,Dr. B. A. Tech. University Lonere-402 103

[email protected]

April 17, 2012

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 1 / 16

Page 2: An A

What is OO Analysis?

Object-oriented analysis is a method of analysis that examinesrequirements from the perspective of the classes and objects found inthe vocabulary of the problem domain.

The emphasis is on finding and describing the objects (or concepts) inthe problem domain.

Input-process-output view, process-orientation, top-downdecomposition, and end-to-end processing sequence, which form theprincipal features of structured analysis are conspicuously absent inobject- oriented analysis.

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 2 / 16

Page 3: An A

What are OO Analysis Methods?

The Coad and Yourdon method is the simplest and the moststraightforward. It demands defining classes and objects, classhierarchies, and attributes and services (operations) as part of theobject-oriented analysis.

The Rambaugh method is the most elaborate. In addition to definingthe classes, the class hierarchies, and their properties (the objectmodel), it also demands defining the dynamic aspects of objects (theobject behaviourthe dynamic model) and modeling it with thehigh-level DFD- like representation flow (the functional model).

Jacobson introduced the concept of use case that has now becomevery popular as a necessary tool for object-oriented analysis.

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 3 / 16

Page 4: An A

Steps in OO Analysis

Sl.No.

Major steps/Substeps of OOA Useful tools/Approaches for the step

1 Get user requirements. Use Case the narrative description of domain processes2 Build the structure of an object model:

Identify objects.Identify relationships between objects.Identify attributes.

CRC method and diverse perspectivesStatic structure diagram (Class and Object diagrams)Various judgment-based guidelines

3. Model system behaviour I:Identify system events and system operations.Write contracts for each operation.

Various judgment-based guidelinesSystem sequence diagrams.Examine pre- and post-condition state changes.

4. Review and change if necessary:Add new functionality.Relate use cases.Extend the object model.

Revisit use cases

Use includes relationships.Develop the real use cases

5. Find generalized class relationships Gen-Spec diagram6. Find associations between classes Whole-Part and other associations7. Organize the object model into packages Package diagram8. Model system behaviour II:

Model state changes.Depict workflows.

Statechart diagramActivity diagram

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 4 / 16

Page 5: An A

Use Cases: Definition and Terminology

A use case is a narrative description of the domain process. It describes a story or a caseof how an external entity (actor) initiates events and how the system responds to them.Thus it specifies the interactions between an actor and the system, describing thesequence of transactions they undertake to achieve system functionality. Together, all theuse cases specify all the existing ways of using the system.

An actor resides outside the system boundary and interacts with the system in eitherproviding input events to which the system responds or receiving certain system responses.An actor may be the end user a primary actor of the system, or he may only beparticipating in the functioning of the system a secondary actor.

Examples A Customer is a primary actor for Sales Accounting system, whereas a SalesPerson, an Accountant, the Materials Management system, or the Production PlanningSystem is a secondary (or participating) actor. Not only human beings, but alsoelectro-mechanical devices such as electrical, mechanical, and computer systems qualify asactors.

Aprocess describes, from start to finish, a sequence of events, actions, and transactionsrequired to produce or complete something of value to an organization or actor.

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 5 / 16

Page 6: An A

Identifying Use Cases

Use cases can be identified in two ways: (1) actor-based and (2)event-based. The sequence of activities to identify the use cases are asunder:

Actor-based use cases

1 Identify the actors.2 Trace the processes each actor initiates or participates in.

Event-based use cases

1 Identify the external events that the system must respond to.2 Trace the actors and processes that are relevant to these events.

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 6 / 16

Page 7: An A

Classification of Use Cases

On the basis of degree of details shown

1 High level (Brief or Casual)2 Expanded level (Fully dressed)

On the basis of importance of the process it represents

1 Primary2 Secondary3 Optional

On the basis of degree of or implementation details shown

1 Essential (or Abstract)2 Real (Concrete)

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 7 / 16

Page 8: An A

Identifying Objects

Identifying objects is one of the first steps in object-oriented analysis ofsystems. Various per- spectives can be taken to identify objects:

The Data Perspective

The Functional Perspective

The Behavioural Perspective

The Scenario Perspective

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 8 / 16

Page 9: An A

Categories of Objects

Object categories ExamplesPhysical and Tangible Objects ProductSpecifications, Designs, or Description ofThings

Product Specification

Places Store, Shop, FactoryTransactions Sale, Buy, Payment, Receipt Sales Line

ItemTransaction Line Items Sales Line ItemRoles of People Sales Manager, AccountantContainers of Other Things Bin, PacketThings in a Container ItemComputers/Devices External to Our Sys-tem

Inventory Control, Production Planning

Abstract Nouns Theft, Loss, FailureOrganizations Factory, Sales DepartmentEvents Meeting, InaugurationProcesses (often not considered as an ob-ject)

Buying A Product

Rules and Policies Recruitment Policy, Promotion PolicyCatalogs Product Catalog, Train Time TableRecords of Finance, Work, Contracts, Le-gal Matters

Ledger, Log Book, Attendance Registrar

Financial Instruments and Services Credit, ShareManuals/Books User Manual, Maintenance Manual

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 9 / 16

Page 10: An A

Registering Seminar TopicA Small Case Study

Students studying the subject ADBT need to write a term paperon an advanced topic from the field of database design,conceptual modeling, semantic web and data mining. A researchpaper published in a leading journal is taken as a base paper forthis purpose. The research paper falls in any one of abovementioned data base field. Students need to register a topic andand give a talk on the selected topic on a specified date andtime. The presentation should be scheduled in room number 11or 12. There should not be any overlapping of presentation andnot more than three presentations should be scheduled on aspecified date.

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 10 / 16

Page 11: An A

Registering Seminar TopicA Small Case Study

The subject teacher requires information about students such asemailId, mobile number in addition to roll number and name.Students have formed a Google group to receive notifications.Hence gmailIds are the valid emailIDs.Design and implement a Web-based term paper assignmentsystem that will allow students to select a topic, that will displaythe schedule of presentations, automatically schedulespresentations and adjusts requests for change of schedule, uploada term paper, upload/download the research papers. Requestsfor paper upload and down load need to be authenticated.

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 11 / 16

Page 12: An A

Registering Seminar TopicScenario Modeling

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 12 / 16

Page 13: An A

Registering Seminar TopicUse Case Textual Description

Use Case Name Register for a TopicPrimary Actor StudentPre-Condition Login, and PasswordPost-Condition Modified student and paper databaseGoal To assign a term paper to studentScenario

1 Enter Login and Password2 Select Area of Interest3 Get List of Papers4 Select a Paper5 Review details of the paper6 Register the term paper topic

Alternatives The selected paper is not availableExceptions 1.

1 User entered Login/ password incorrect.2 No Paper is available for selection.

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 13 / 16

Page 14: An A

Registering Seminar TopicObject Modeling

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 14 / 16

Page 15: An A

Activity ModelingRegister the term paper topic:An Example

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 15 / 16

Page 16: An A

Behavioral Modeling

Arvind W. Kiwelekar Assistant Professor Computer Engineering Department, Dr. B. A. Tech. University Lonere-402 103 [email protected] ()Object-Oriented Analysis April 17, 2012 16 / 16