Module 3 OOMD
Module 3 OOMD
Module 3 OOMD
Module-3
Chapter-8
Analysis
8.1 Overview of analysis
- Analysis is the first step of Object Modeling Technique(OMT) methodology
- Analyst tries to understand about the problem
- Analysis determines what is to be done and not how it is implemented
- Analysis begins with a problem statement
- Analysis is not a mechanical process
- Most problem statement lack essential information which must be obtained from the requestor
- The analyst must communicate with the requestor to clarify ambiguities
- The analysis model facilitate precise communication
8.2 Object Modeling
- The first step in analyzing the requirement is to construct an object model
- The object model describes real-world object classes and their relationship to each other
- Information for object model comes from problem statement, expert knowledge of application
domain and general knowledge of real world
- Identify classes and associations first and add attibutes
- Then combine and organize classes using inheritance
- Add operations to classes
- Steps in constructing an object model are:
Identify objects and classes
Prepare a data dictionary
Identify associations
Identify attributes of objects and links
Organize and simplify object classes using inheritance
Verify that access paths exist for likely queries
Iterate and refine the model
Group classes into modules
- An event occurs whenever information is exchanged between an object in the system and
an outside agent such as user, sensor or another task.
ATM asks the user to insert card; the user inserts card
ATM accepts card and read its serial number
ATM requests password; user enters “1234”
ATM verifies password with consortium
ATM asks user to select the kind of transaction (withdrawal, deposit,
ministatement); user selects withdrawal
ATM asks for the amount of cash; the user enters $100
ATM verifies that amount in account balance
ATM dispenses cash and asks user to take it; the user takes the cash
ATM asks whether the user wants to continue; user indicates no
ATM prints a receipt, ejects the card and asks user to take them; the user takes the
receipt and the card
ATM asks user to insert card
ATM asks the user to insert card; the user inserts card
ATM accepts card and read its serial number
ATM requests password; user enters “9999”
ATM verifies password with the consortium
ATM indicates incorrect password and asks user to renter it; the user enters
“1234” which the ATM verifies successfully with consortium
ATM asks user to select the kind of transaction (withdrawal, deposit,
ministatement); user selects withdrawal
ATM asks for the amount of cash; the user has a change of mind and hits
cancel
ATM ejects the card and asks user to take it; the user takes it
ATM asks user to insert card
Fig 8.2 ATM Scenario with exception
insert card
enter password
enter amount
take cash, take card
cancel,continue
User ATM
display main screen
unreadable card message
request password
request kind , amount verify account transaction succeed,failed
canceled message process transaction account ok
eject card,dispense cash
print receipt,
verify card
verify card
process bank transaction
Bank transaction succeed,failed
bankaccount
Bank accountOKOK
Bank bank transaction succeed
Consortium
Fig 8.3 Event flow diagram for ATM
insert card
request password
enter password
verify account
verify card
bank account OK
account OK
request kind
enter kind
request amount
enter amount
process transaction
Process bank transaction
terminate
Print receipt
Eject card
Take card
Administrator Verifying
username & User name
password Password
Rejected
- The final verified analysis model serves as basis for system architecture, design and
implementation
8.6.3 Analysis and design
- The goal of analysis is to fully specify the problem
- The purpose of rules is to preserve flexibility and permit changes later
CHAPTER-9
System Design
- System design is for solving the problem and building a solution
- System design includes decisions about the organization of system into subsystem, the
allocation of subsystem to hardware and software components and policy decisions that
form framework for detailed design
- The overall organization of a system is called system architecture
9.1 Overview of system design
- During analysis the focus is on what needs to be done, independent of how it is done
- During design, decisions are made about how the problem will be solved first at high level
then at detailed levels
- System design is the first stage in which basic approach to solve the problem is selected
- The system design must take the following decisions:
Organize the system into subsystem
Identify concurrency inherent in the problem
Allocate subsystem to processors and tasks
Choose an approach for management of data stores
Handle access to global resources
Choose implementation of control in software
Handle boundary condition
Set trade-off priorities
9.1.1 Breaking system into subsystem
- Divide the system into small number of components
- Each major component of a system is called subsystem
- Subsystem is package of classes, associations, operations and constraints
- Subsystem is identified by the service it provides
- Service is a group of related functions that share common purpose
- Each subsystem has a well defined interface
- A system should be divided into small number of subsystems
Application package
window graphics
User
Simulation
Dialog
screen graphics package
control
pixel graphics
operating system
computer hardware
- If the events are unsynchronized the objects cannot be folded onto a single thread of
control
- Eg: The engine and wing controls on airplane must operate concurrently
- Two subsystems that are inherently concurrent need not to be implemented as
separate hardware units. The purpose of hardware interrupts, operating system and
tasking mechanism is to simulate logical concurrency in a uniprocessor
- If there are no timing constraints multitasking operating system can handle the
computation
9.1.2.2 Defining concurrent tasks
- Although all objects are concurrent many objects are interdependent
- By examining state diagram of individual objects and the exchange of events among
them many objects can be folded together on single thread of control
- A thread of control is a path through a set of state diagram on which a single object
at a time is active
- A thread remains within a state diagram until an object sends an event to another
object and waits for another event
- The thread splits if the object sends an event and continues executing
- On each thread of control only a single object at a time is active
- Thread of control are implemented as tasks in computer system
- Eg: While the bank is verifying an account or processing a bank transaction the
ATM machine is idle. If the ATM is directly controlled by a central computer, then
the ATM object can be folded together with the bank transaction object as a single
task
9.1.3 Allocating subsystems to processors and tasks
- Each concurrent subsystem must be allocated to a hardware unit
- The system designer must:
Estimate performance needs and the resources needed to satisfy them
Choose hardware or software implementation for subsystem
Allocate software subsystems to processors to satisfy performance needs and
minimize interprocess communication
- Event driven control is more difficult to implement than procedure driven control
- Advantage: useful, simpler, modular and handle error conditions
9.1.6.3 Concurrent systems
- Control resides concurrently in several independent objects
- Events are implemented directly as one-way messages
- A task can wait for input, but other tasks continue execution
- Operating system supplies a queuing mechanism for events so that events are not
lost if a task is executing when they arrive
- Operating system resolves scheduling conflicts among tasks
- Eg:tasks on an operating system
- If there are multiple CPUs then difficult tasks can execute concurrently
9.1.6.4 Internal control
- During design process operations on objects are expanded into lower level
operations
- Internal interactions between objects can be viewed to external interactions among
objects as events passed between objects
9.1.6.5 Other paradigms
- Rule based systems, logic programming systems and other forms of non
procedural programs
- These languages are different from procedural languages
9.1.7 Handling boundary conditions
- System designer must consider boundary such as:
Initialization:- In initialization the system must be brought from initial state to
steady state condition. Things to be initialized include parameters, global
variables, tasks. During initialization only a subset of functionality of system is
available. Initializing a system containing concurrent tasks is difficult
Termination:- Termination is simpler than initialization because many internal
objects can be abandoned
Failure:- Failure is the unplanned termination of a system. Failure can arise from
user errors or from bugs in the system
Viewspace Clipped
Graphic Image Image Screen
Model map clip offset Image