Chapter#4 ObjectModeling

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Object Structuring

Lecture#4
Object Structuring Criteria

• Determine all software objects in system


– Use Object Structuring Criteria
– Guidelines for identifying objects
• Structuring criteria depicted using stereotypes
– Stereotype defines a new building block that is derived from an existing
UML modeling element but is tailored to the modeler’s problem
– Depicted using guillemets
• «entity», «boundary», «control»
• Objects are categorized
– A category is a specifically defined division in a system of classification
Object Structuring Criteria

• Boundary objects
– User interaction object – Device I/O object
– Proxy object
• Entity objects
– Long living objects that store information
– Determined during static modeling
• Control objects
• Application Logic Objects
Object Structuring Criteria

• Boundary objects
– Interface to and communicate with external
• environment
– Each software boundary object interfaces to an external (real-world) object
• User interaction object • Device I/O object
• Proxy object
• For each boundary object there is a corresponding external object
– Also depicted using stereotype
Classification of external classes using stereotypes
User interaction object

• Interfaces to and interacts with a human user


– Via standard I/O devices
• keyboard, visual display, mouse
– Support simple or complex user interfaces
• Command line interface
• Graphical user interface (GUI)
Example of user interaction object
Object Structuring Criteria

• Proxy object
– Interfaces to an external system
– Hides details of how to communicate with external system
• E.g., Robot Proxy
• Interfaces to external (real-world) robot
Object Structuring Criteria

• Device I/O boundary object – Interfaces to I/O device


• Input object
– E.g., Sensor Interface
• Output object
– E.g., Actuator Interface
• I/O (Input/Output) object
– E.g., ATM Card Reader Interface
Depicting External Classes and Boundary Classes

• Start from system context class diagram – Shows external classes


– System (aggregate class)
• Each external class must interface to
– software boundary class
• UML
– System shown as aggregate class
– External classes are outside the system class
– Boundary classes are inside the system class
Banking System external classes and software boundary
classes
Object Structuring Criteria

• Entity objects
– Long lasting objects that store information
• Same object typically accessed by many use cases
• Information persists over access by several use cases
– E.g., Account, Customer
– Entity classes and relationships shown on static model
– Entity classes often mapped to relational database during design
Example of entity object
Object Structuring Criteria

• Control objects
– Provides overall coordination for execution of a group
of objects
– Makes overall decisions
– Decides when, and in what order, other objects participate in interaction
sequence
• Entity objects
• Boundary objects
• Control objects
– Coordinator object
– State dependent control object – Timer object
Coordinator object

• Coordinator object
• Provides sequencing for group of objects
• Is not state dependent
State dependent control object

• State dependent control object


• Defined by finite state machine or state transition table
• Controls other objects
Timer object

• Timer object
• Activated periodically
• Object Structuring Criteria
• Application Logic Objects – Business Logic Object
• Defines business specific application logic (rules) for processing a client request
• Usually accesses more than one entity object
– Algorithm Object
– Service object
Example of algorithm object
Example of Service object
Case Study: Banking System

• Multiple Automated Teller Machines (ATM)


– Customer inserts ATM Card
– Enters Personal Identification Number (PIN)
– ATM Transactions
• PIN Validation
• Withdraw Funds from Checking or Savings Account
• Query Account
• Transfer funds between accounts
• Banking System maintains information about
• – Customers
– Debit cards
– Checking and Savings Accounts
Banking System use case model
Banking System class context diagram
Banking System external classes and software boundary
classes

You might also like