Object Oriented Design - Unit 5 - PART II Subject Material: Contents in This Unit
Object Oriented Design - Unit 5 - PART II Subject Material: Contents in This Unit
Object Oriented Design - Unit 5 - PART II Subject Material: Contents in This Unit
Reference Book Singh Y., Malhotra R., Object oriented Software Engineering
INTRODUCTION
In chapter 2, we saw Object oriented software development life cycle:[ page 44 ].
This lifecycle has four phases which is different from the traditional SDLC.
OO requirement analysis
OO analysis
OO design
Activities
Transition
Branching
Example: Activity diagram for addition subtraction and multiplication of two numbers.
Using Swimlanes
o A swimlane groups all the activities that are carried out by the owner of the swimlane.
o Used to determine which business entity is responsible for carrying out a specific
activity.
o Each swimlane is represented by a unique name.
o Swimlanes are represented by vertical lines that divide
divide each group from its
neighbours.
Select item
Place order
Receive order
Provides credit
card details
Receives credit
card details
Verifies credit
card details
Confirms order
Gets item
Ships item
Receives item
Sends bill
3. To model an operation
Statechart Diagram
Statechart diagram also models dynamic aspects of the system.
This diagram used to model the life cycle of the object, from the time it is created until the
object is destroyed.
In statechart diagram, various states through which an object goes through during its life cycle
are depicted.
An activity diagram is used to model the Statechart diagram models the states of an object’s
sequence of activities in a process or an lifetime
operation
States
» A state is one of the conditions that on object may satisfy during its lifetime.
» In the given state, the object may perform some activity or wait for some event to
happen.
» The transition causes an object to move from one state to another state.
» State transition is represented by a directed line.
Example:
» In LMS, book is initialized for,
o open for issue (members can get the book issued),
o close for issue(book is already issued)
o expired (not in physical condition to be issued)
Event
Action
Guard condition
» A guard condition is a Boolean expression that tests whether the condition is true or not.
» If the
he condition is true, then the state transition is done, otherwise not.
» Example:
o The book will only be issued to the member if the account is not full.
» Statechart diagram model the states through which a single object goes through during its life
cycle.
» When a dynamic object is modelled, essentially three things are specified
States through which the object goes
Events that are triggered for transition from one state to another state
Actions that are performed during the transition of the state.
Creating substates
Example:
Consider University Registration System. The students are registered in the beginning of each
semester. The registration must be completed by the students within 15 days of the start of the
registration process. Draw statechart diagram showing the states of registration
» The persistent objects stay alive even after the program is no longer
longer in execution.
» Thus it is need to store objects permanently in the secondary memory.
DBMS is a software system that can manage large amount of data in an efficient
manner
Inheritance in tables
» If the entity class are having generalization relationships, following ways to convert then into
tables
The base class and derived classes are converted into tables.
• derived class consists of reference to the primary key of the base table.
• primary key of tables of derived class are same as of tables of base class.
The inherited attributes are copied to all the tables of derived class.
Coding standards
Refactoring
Reusability
» The components of the software should be easily reusable in some other software.
» Aim of implementation should be
To build high-quality and maintainable components that can be reused.