Professional Documents
Culture Documents
UNIT-3
SYSTEM MODELS
1. Introduction :
1
3. Context Model :
2
4. Behavioral Model :
3
b) State-machine models :describes how a system responds to internal
or external events.
The state machine model shows system states and events that cause
transactions from one state to other.
It does not show the flow of data within the system.
A state machine model of a system assumes that, at any time, the
system is in one of a number of possible states.
When a stimulus is received, this may trigger a transition to a
different state.
For example, a system controlling a valve may move from a state
‘Valve open’ to a state ‘Valve Closed’.
The below diagram shows a state machine model of a simple
microwave oven equipped with buttons to set the power and the
time and to start the system.
State Machine Model of a simple microwave oven :
4
5. Data Models :
5
6. Object Models :
An objective-oriented approach to the whole software development
process is particularly for interactive systems development.
This means expressing the systems requirements using an object model,
designing using objects and developing the system in an object-oriented
programming language.
Object models that you develop during requirements analysis may be
used to represent both system data and its processing.
An object class is an abstraction over a set of objects that identifies
common attributes and the services or operations that are provided by
each object.
Objects are executable entities with the attributes and services of the
object class.
Objects are instantiations of the object class and many objects may be
created from a class.
An object class in UML, is represented as a vertically oriented rectangle
with three sections : (in the following figure)
a) The name of the object class is in the top section.
c) The operations associated with the object class are in the lower
section of the rectangle.
Inheritance Models :
These specialized objects may have their own attributes and services.
6
The following figure illustrates part of a simplified class hierarchy for a
model of the library.
This hierarchy gives information about the items held in the library.
Part of a class hierarchy for a library :
The library (above figure) holds various items, such as books, music,
recording of films, magazines and news papers.
In this figure, the most general item is at the top of the tree and has a
set of attributes and services that are common to all library items.
7
These are inherited by the classes ‘Published item’ and ‘Recorded item’,
which add their own attributes that are then inherited by lower-level
items.
those who may only read books in the library without taking them
away.
In the UML notation, inheritance is shown ‘upwards’ rather than
‘downwards’, where sub-classes inherit from super-classes.
This is called ‘generalisation relationship’.
User Class Hierarchy :
8
Multiple Inheritance :
Multiple Inheritance models are constructed where a class has several
parents.
The following is an example of multiple inheritance model that is a part
of the library model :
7. Object Aggregation :
Let there are some objects, which are groupings of other objects.
That is, an object is an aggregate of a set of other objects.
The classes representing these objects may be modeled using an object
aggregation model.
The UML notation for aggregation is to represent the composition by
including a diamond shape on the source of the link.
That is in the following diagram, ‘A study pack’ is composed of one of
more assignments, OHP slide packages, lecture notes and videotapes.
IN the following diagram, a library item is modeled.
9
Aggregation object representing a course :
10
The issue of electronic items :
9. Structured Methods :
A structured method is a systematic way of producing models of an
existing system that is to be built.
Structured methods provide a framework for detailed system modeling
as part of requirements elicitation and analysis.
CASE tools are usually available for method support.
These tools support model editing and code and report generation, and
provide some model-checking capabilities.
Analysis and design case tools support the
- creation - editing - analysis
of the graphical notations used in structured methods.
The following diagram shows the components that may be included
method support environment.
11
The components of a CASE tool for structured method support :
12
10. Design Engineering :
Design Engineering encompasses the set of principles, concepts and
practices that lead to the development of a high-quality system or
product.
Design is a core engineering activity.
The goal of design engineering is to produce a mode or representation
that exhibits firmness, commodity and delight.
Design engineering for computer software changes continually as new
methods, better analysis and broader understanding evolve.
The flow information during software design is as follows.
i.e., Translating the analysis model into the design model :
13
11. Design Process :
Software Design is an iterative process through which requirements are
translated into a ‘blue print’ for constructing the software.
The design is represented at a high level of abstraction – a level that can
be directly traced to the specific system objective and more detailed
data, functional, and behavioral requirements.
There are three characteristics that serve as a guide for the evaluation of
a good design :
a) The design must implement all of the explicit requirements contained
in the analysis model, and it must accommodate all of the implicit
requirements desired by the customer.
14
d) A design should lead to data structures that are appropriate for the
classes to be implemented and are drawn from recognizable data
patterns.
15
14. Design Concepts :
‘Fundamental Software Design concepts provide the necessary
framework for getting it right’.
a) Abstraction : In a modular solution to any problem, many levels of
abstraction can be posed.
16
c) Patterns : “ A pattern is a named nugget of insight which conveys the
essence of a proven solution to a recurring problem within a certain
context amidst competing concerns”.
Each pattern describes a problem which occurs over and over again in
our environment, and then describes the core of the solution to the
problem, in such a way that you can use this solution a million times
over, without ever doing it the same way twice.
d) Modularity : Software architecture and design patterns embody
‘modularity’ – that is, software is divided into separately named and
addressable components, sometimes called ‘modules’, that are
integrated to satisfy problem requirements, that are integrated to
satisfy problem requirements.
‘Modularity’ is the single attribute of software that allows a program
to be intellectually manageable.
The complexity of two problems when they are combined is often
greater than the sum of the complexities, when each is taken
separately.
Modularity and Software Cost :
17
e) Information Hiding : The principle of ‘Information Hiding’ suggests
that modules be “characterized by design decisions that each hides
from all others.
18
g) Refinement : Stepwise refinement is a top-down design strategy.
19
The following are the five different types of design classes, each
representing a different layer of the design architecture :
20
15.Design Model :
The design model has four major elements :
- data - architecture
- components - interface
The design model can be viewed in two different dimensions as follows :
The process dimension indicates the evolution of the design model as
design tasks are executed as part of the software process.
The abstraction dimension represents the level of detail as each
element of the analysis model is transformed into a design equivalent
and then refined iteratively.
In the following diagram, the dashed line indicates the boundary
between the analysis and design models.
The elements of design model use many of the same UML diagrams that
were used in the analysis model.
The difference is that these diagrams are refined and elaborated as part
of design; more implementation-specific detail is provided.
21
Data Design Elements : Data design creates a model of data and / or
information that is represented at a high level of abstraction.
The structure of data has always been an important part of software
design.
At the program component level, the design of data structures and the
associated algorithms required to manipulate them is essential to the
creation of high-quality applications.
At the application level, the translation of a data model into a database
is pivotal to achieving the business objectives of a system.
At the business level, the collection of information stored in disparate
databases and reorganized into a ‘data warehouse’ and reorganized into
a ‘data warehouse’ enables data mining or knowledge discovery that can
have an impact on the success of the business itself.
22
Interface Design Elements : The interface design for software is the
equivalent to a set of detailed drawings for the doors, windows and
external utilities of a house.
There are three important elements of interface design :
a) The user interface (UI)
23
Component-Level Design Elements :
The component-level design for software is equivalent to a set of
detailed drawings for each room in a house.
These drawings depict wiring and plumbing within each room, the
location of the electrical receptacles and switches, sinks, showers, tubs,
drains and cabinets.
Within the context of OOSE, a component is represented in UML
diagrammatic form.
Deployment-Level Design Elements :
Deployment-Level Design Elements indicate how software functionality
and subsystems will be allocated within the physical computing environ-
ment that will support the software.
For example, the elements of the ‘Safe Home’ product are configured to
operate within three primary computing environments :
a) A home-based PC
b) The ‘safe home’ control panel.
c) The server housed at CPI corp.(providing internet based access
to the system).
24
16.Designing Class Based Components :
Seven basic design principles are applicable to component-level design
and have been widely adopted when object-oriented software
engineering (OOSE) is applied :
a)The The Open-Closed Principle (OCP) : “ A module (component)
should open for extension but closed for modification”.
For example, assume that the ‘safe home’ security function makes use of
a ‘detector’ class that must check the status of each type of security
censor.
The OCP for the ‘detector’ class :
25
f) The Common Closure Principle (CCP) :
“Classes that change together belong to gether”.
g) The Common Reuse Principle (CRP) :
“Classes that are not reused together should not be grouped
together”.
17. Component- Level Design Guidelines :
A set of pragmatic design guidelines can be applied as component-level
design proceeds.
These guidelines apply to components, their interfaces and the
dependencies and inheritance characteristics that have an impact on the
resultant design.
a) Components : Naming conventions should be established for
components that are specified as part of the architectural model and
then refined and elaborated as part of the conventional-level model.
Architectural component names should be drawn from the problem
domain and should have meaning to all stakeholders who view the
architectural model.
b) Interfaces : Interfaces provide important information about
communication and collaboration.
18. Cohesion :
A set of pragmatic design guidelines can Within the context of
component-level design for object-oriented systems, ‘cohesion’ implies
that a component or class encapsulates only attributes and operations
that are closely related to one another and to the class or component
itself.
26
Different types of Cohesion :
27
19. Coupling :
28
20. Conducting Component-Level Design :
29
e) Identify appropriate interfaces for each component.
Refactoring interfaces and class definitions for ‘Print Job’ :
Here, the class ‘WorkOrder’ will take care of all activities associated
with the assembly of a work order.
The operation ‘BuildWorkOrder’ is a method in the class
‘WorkOrder’.
A class ‘ProductionJob’ would encompass all information associated
with a production job to be passed to the production facility.
The interface ‘initiatejob’ is now cohesive, focusing on one function.
The interfaces associated with ‘ProductionJob’, ‘WorkOrder’, and
‘JobQueue’ are similarly single-minded.
30
i) Develop and elaborate behavioral representations for a class or
component.
31
- The visual layout of the interface should be based on real world
metaphor.
- Disclose information in a progressive fashion.
c) Make the Interface Consistent :
- Maintain consistency across a family of applications.
- If past interactive models have created user expectations,
do not make changes unless there is a compelling reason to do so.
In general, things that look different should act different.
Things that look the same should act the same.
Note : These golden rules actually form the basis for a set of user
interface design principles that guide this important software
design action.
* * * * *
32