Sei sulla pagina 1di 38

Introduction to Object Oriented Modeling

R K Joshi IIT Bombay

R.K. Joshi, IIT Bombay

Concepts to Realization

R.K. Joshi, IIT Bombay

Realization to Conceptual Understanding

R.K. Joshi, IIT Bombay

Need to Model Different aspects of/for the software to be built


R.K. Joshi, IIT Bombay

R.K. Joshi, IIT Bombay

Conceptual ideas

R.K. Joshi, IIT Bombay

Conceptual ideas

End goals

R.K. Joshi, IIT Bombay

Conceptual ideas

End goals

User interfaces

R.K. Joshi, IIT Bombay

Conceptual ideas

End goals

User interfaces

Product Implementatio n Models

R.K. Joshi, IIT Bombay

Conceptual ideas

End goals

User interfaces

Product Implementatio n Models

Deployment Models, N/W, Architectur e

R.K. Joshi, IIT Bombay

Conceptual ideas

End goals

User interfaces

Product Implementatio n Models

Deployment Models, N/W, Architectur e

Man month

R.K. Joshi, IIT Bombay

Conceptual ideas

End goals

User interfaces

Product Implementatio n Models

Deployment Models, N/W, Architectur e Financial Model

Man month

R.K. Joshi, IIT Bombay

Conceptual ideas

End goals

User interfaces

Product Implementatio n Models

Deployment Models, N/W, Architectur e Financial Model

Man month

The software developmen t process


R.K. Joshi, IIT Bombay

Modeling

R.K. Joshi, IIT Bombay

Modeling
Modeling tools

R.K. Joshi, IIT Bombay

Modeling
Modeling tools Microscopic views & Iterative Refinement

R.K. Joshi, IIT Bombay

Modeling
Modeling tools Microscopic views & Iterative Refinement

Documentation

R.K. Joshi, IIT Bombay

Product Models

Structure
R.K. Joshi, IIT Bombay

Dynamics

Static Modeling
Furniture? Rooms? Electrical Wiring? Flats? Water pipelines Building? Air ducts?

R.K. Joshi, IIT Bombay

Models throughout the Lifecycle


Per class Per object Collaborating classes Collaborating objects Collection of classes (source code) Location of classes, modules ..

R.K. Joshi, IIT Bombay

Structural (Static) Modeling


Class diagrams Object Diagrams Deployment Diagram File directory hierarchy Component Package diagrams Entity Relationship
R.K. Joshi, IIT Bombay

A Static Model
Stack

Push () Pop() Size()

R.K. Joshi, IIT Bombay

Visualcomponent draw ()

Another Static Model

TextView

Decorator
draw()

component

operation ()

Component->draw()

Scroller
draw () drawScroller

Border
draw() drawBorder() Decorator::draw() drawBorder()

R.K. Joshi, IIT Bombay

Dynamic Modeling

R.K. Joshi, IIT Bombay

Dynamic Modeling
How does the group collaborate?

R.K. Joshi, IIT Bombay

Dynamic Modeling
How does the group collaborate? How does the individual respond?

R.K. Joshi, IIT Bombay

What happens amongst the objects?

R.K. Joshi, IIT Bombay

Interaction Diagram: Item issue use case


:Operator iw:IssueWin tr1: Issue supply bid,uid b:Book u:User create issue(bid, uid) bind using bid
bind using uid

isIssuable? issue (u) committed destroy


R.K. Joshi, IIT Bombay

hasToken? issue (b)

What happens inside an object?

R.K. Joshi, IIT Bombay

A State Machine
fetch [size =1] fetch [size >1]

Full
insert [size =MAX-1] insert [size =MAX-1] insert [size <MAX-1]

Empty

Partial

fetch [size =1] Initial state


R.K. Joshi, IIT Bombay

insert [size <MAX-1]

Including Error Conditions insert /


signal error fetch [SIZE =1] fetch [SIZE >1]

Full
insert [SIZE =MAX-1] fetch / signal error insert [SIZE =MAX-1] insert [SIZE <MAX-1]

Empty

Partial

fetch [SIZE =1] Initial state


R.K. Joshi, IIT Bombay

insert [size <MAX-1]

How are various interactions/activities linked with each other?

R.K. Joshi, IIT Bombay

Activity Diagram

Scan Users barcode


[scan okay] [scanner failed] enter user id

by hand

Scan Book barcode


[scan okay] [scanner failed] enter bookid

by hand Perform return transaction

R.K. Joshi, IIT Bombay

How much can you model?


Can the full system be specified during modeling? What other modeling languages exist? Can the full system be generated from the model? Benefits of Modelchecking Modeling language vs. implementation language
R.K. Joshi, IIT Bombay

Code Generation
Class structures Basic Relations Basic constructions Helper Code Service Orientation
Intermediate formats and Platform dependent code generation techniques

R.K. Joshi, IIT Bombay

Traceability
Models
Seamlessness

Moving from early conceptualization to construction and eventually into delivery and maintenance Changes reflected back

R.K. Joshi, IIT Bombay

Summary
Model ---> Implementation Implementation --> Model Forward engineering
Specify/model first and then go on to build

Many facets of a system --> many models Consistency between models Traceability to Implementation Automatic Code Generation R.K. Joshi, IIT Bombay

Potrebbero piacerti anche