Bit 223 Object Oriented Analysis and Design
Bit 223 Object Oriented Analysis and Design
INTRODUCTION:
Software development is dynamic and always undergoing major change. Today a vast
number of tools and methodologies are available for system development. System
development refers to all activities that go into producing information system solution.
System development activities consist of system analysis, modelling, design,
implementation, testing and maintenance. A software development methodology is series of
processes that, if followed, can lead to the development of an application. The original goal
based on the system requirements. Further we study about the unified approach, which is the
methodology used for learning about object oriented system development.Object-Oriented
(OO) systems development is a way to develop software by building self-contained modules
that can be more easily:
Replaced
Modified
and Reused.
KABARAK UNIVERSITY
Object Oriented Analysis and Design
The unified approach (UA) is a methodology for software development that is used in
this book.
The UA, based on methodologies by Booch, Rumbaugh, Jacobson, and others, tries to
combine the best practices, processes, and guidelines.
UA based on methodologies by Booch, Rumbaugh and Jacobson tries to combine the
best practices, processes and guidelines along with the object management groups in
unified modelling language.
UML is a set of notations and conventions used to describe and model an application.
UA utilizes the unified modeling language (UML) which is a set of notations and
conventions used to describe and model an application.
OBJECT BASICS:
Goals:
• Define Objects and classes
• Describe objects‘ methods, attributes and how objects respond to messages,
• Define Polymorphism, Inheritance, data abstraction, encapsulation, and protocol,
• Describe objects relationships,
• Describe object persistence,
• Understand meta-classes.
What is an object?
• The term object was first formally utilized in the Similar language to simulate some
aspect of reality.
• An object is an entity.
o It knows things (has attributes)
o It does things (provides services or has methods)
Example:
It Knows things (attributes)
I am an Employee.
I know my name,
social security number and
my address.
Attributes
I am a Car.
I know my color,
manufacturer, cost,
owner and model.
It does things (methods)
I know how to
compute
my payroll.
Object Oriented Analysis and Design
Attributes or properties describe object‘s state (data) and methods define its behavior.
Object:
Traditional Approach
• The traditional approach to software development tends toward writing a lot of code
to do all the things that have to be done.
• You are the only active entity and the code is just basically a lot of building materials.
Object-Oriented Approach
OO approach is more like creating a lot of helpers that take on an active role, a spirit,
that form a community whose interactions become the application.
Object’s Attributes
Object’s Methods
Methods define objects behavior and specify the way in which an Object‘s data
are manipulated.
In the Car example the car‘s methods are:
drive it, lock it, tow it, carry passenger in it.
The role of a class is to define the attributes and methods (the state and behavior)
of its instances.
Motor Vehicle
The class car, for example, defines the property color.
Each individual car (object) will have a value for this property, such as "maroon,"
"yellow" or "white."
Bu Truck Car
Class Hierarchy s
Inheritance is a relationship between classes where one class is the parent class of another
(derived) class.
Inheritance allows classes to share and reuse behaviors and attributes.
The real advantage of inheritance is that we can build upon what we already have and,
Reuse what we already have.
Vehicle
Car
stop (myMustang)
Multiple Inheritances
For example utility vehicle inherent from Car and Truck classes.
MotorVehicle
UtilityVehicle
Message
Objects perform operations in response to messages. For example, you may communicate
with your computer by sending it a message from hand-help controller.
A Case Study - A Payroll Program
Consider a payroll program that processes employee records at a small manufacturing
firm. This company has three types of employees:
Managers: Receive a regular salary.
Office Workers: Receive an hourly wage and are eligible for overtime after
40 hours.
Production Workers: Are paid according to a piece rate.
Object-Oriented Approach
What objects does the application need?
• The goal of OO analysis is to identify objects and classes that support the problem
domain and system's requirements.
• Some general candidate classes are:
• Persons
• Places
• Things
Class Hierarchy
• Identify class hierarchy
• Identify commonality among the classes
• Draw the general-specific class hierarchy.
Employee
Class Hierarchy
name
address
salary
SS#
ring
dataEntry dataEntry dataEntry
ComputePayroll ComputePayroll ComputePayroll
printReport printReport printReport
Object Oriented Analysis and Design
OO Approach
FOR EVERY EMPLOYEE DO
BEGIN
employee computePayroll
END
Polymorphism
Polymorphism means that the same operation may behave differently on different classes.
Example: computePayroll
Associations
The concept of association represents relationships between objects and classes.
For example a pilot can fly planes
Meta-Classes
• Everything is an object.
• How about a class?
• Is a class an object?
• Yes, a class is an object! So, if it is an object, it must belong to a class.
• Indeed, class belongs to a class called a Meta-Class or a class' class.
• Meta-class used by the compiler. For example, the meta-classes handle messages
to classes, such as constructors and "new."
Rather than treat data and procedures separately, object-oriented programming packages
them into "objects." O-O system provides you with the set of objects that closely reflects the
underlying application. Advantages of object-oriented programming are:
Goals
The software development process
Building high-quality software
Object-oriented systems development
Use-case driven systems development
Prototyping
Rapid application development
Component-based development
Continuous testing and reusability
Object Oriented Analysis and Design
Software Process
The essence of the software process is the transformation of
Users‘ needs to
The application domain into
A software solution.
What
How
Do It
Test
©Use
Einstein Colle
Software Quality
Quality Measures
• Systems can be evaluated in terms of four quality measures:
– Correspondence
– Correctness
– Verification
– Validation
• Correspondence measures how well the delivered system corresponds to the needs of
the operational environment.
It cannot be determined until the system is in place.
Correspondence
• Correctness measures the consistency of the product requirements with respect to the
design specification.
Correctness
• Verification - "Am I building the product right?"
Validation
Verification
Build use-case
Build
Use-Cases Validate/ Test
model
Object
analysis Validate/
test
O-O Analysis
• Object-oriented analysis.
• Object-oriented design.
• Prototyping.
• Component-based development.
• Incremental testing.
Use case
models/
documnet
Object Design
interaction classes
diagram, etc. UI
Object-Oriented Analysis
Object-Oriented Design
Types of Prototypes
Open Connectivity
Legacy screens
Legacy software packages
• RAD is a set of tools and techniques that can be used to build an application faster
than typically possible with traditional methods.
• RAD does not replace SDLC but complements it, since it focuses more on process
description and can be combined perfectly with the object-oriented approach.
Object Oriented Analysis and Design
Incremental Testing
• Software development and all of its activities including testing are an iterative
process.
• If you wait until after development to test an application for bugs and
performance, you could be wasting thousands of dollars and hours of time.
Reusability
A major benefit of object-oriented systems development is reusability, and this is the most
difficult promise to deliver on.
Reuse strategy
• Information hiding (encapsulation).
• Conformance to naming standards.
• Creation and administration of an object repository.
• Encouragement by strategic management of reuse as opposed to constant
redevelopment.
• Establishing targets for a percentage of the objects in the project to be reused (i.e.,
50 percent reuse of objects).
The essence of the software process is the transformation of users‘ needs into a software
solution. The O-O SDLC is an iterative process and is divided into analysis, design,
prototyping/ implementation, and testing.
Rumbaugh Methodologies
Object Oriented Analysis and Design
OMT (Object Modeling Technique) describes a method for the analysis, design, and
implementation of a system using an object-oriented technique. Class attributes, method,
inheritance, and association also can be expressed easily
Phases of OMT
Analysis
System Design
Object Design
Implementation
OMT consists of four phases, which can be performed iteratively:
Analysis. The results are objects and dynamic and functional models.
System design. The result is a structure of the basic architecture of the system.
Object design. This phase produces a design document, consisting of detailed objects
and dynamic and functional models.
Implementation. This activity produces reusable, extendible, and robust code.
OMT Modeling
OMT separates modeling into three different parts:
An object model, presented by the object model and the data dictionary.
A dynamic model, presented by the state diagrams and event flow diagrams.
A functional model, presented by data flow and constraints.
Booch Methodology
The Booch methodology covers the analysis and design phases of systems
development.
Booch sometimes is criticized for his large set of symbols.
The Booch method consists of the following diagrams:
o Class diagrams
o Object diagrams
o State transition diagrams
o Module diagrams
o Process diagrams
o Interaction diagrams
Car
color
manufacturer
cost superclass
inherits
Ford
inherits
Enabled
SoundAlarm
Silenced Sounding
SilenceAlarm
Enable Disable
AlarmFixed
Disabled
• The Booch methodology prescribes
1. Conceptualization
2. Analysis and development of the model.
3. Design or create the system architecture.
4. Evolution or implementation.
5. Maintenance.
Conceptualization:
• Establish the core requirements of the system
• Establish a set of goals and develop prototype to prove the concept
• Using the class diagram to decide what mechanisms are used to regulate how
objects collaborate
• Using the module diagram to map out were each class and object should be
declared
• Using the process diagram to determine to which processor to allocate a process.
Also, determine the schedules for multiple processes on each relevant processor
Evolution or implementation
Maintenance
• Make localized changes to the system to add new requirements and eliminate bugs
Jacobson Methodologies
The Jacobson et al. methodologies (e.g., OOBE, OOSE, and Objectory) cover the entire life
cycle and stress traceability between the different phases.
• Use cases again are the central vehicle for modeling, providing traceability
throughout the software engineering processes.
• OOBE consists of :
– Analysis phase
– Design
– Implementation phases and
– Testing phase.
Patterns
• A pattern is instructive information that captures the essential structure and
insight of a successful family of proven solutions to a recurring problem that
arises within a certain context and system of forces.
• The main idea behind using patterns is to provide documentation to help
categorize and communicate about solutions to recurring problems.
• The pattern has a name to facilitate discussion and the information it represents.
• A good pattern will do the following:
• It solves a problem. Patterns capture solutions, not just abstract principles or
strategies.
• It is a proven concept. Patterns capture solutions with a track record, not theories
or speculation.
• The solution is not obvious. The best patterns generate a solution to a problem
indirectly—a necessary approach for the most difficult problems of design.
• It describes a relationship. Patterns do not just describe modules, but describe
deeper system structures and mechanisms.
• The pattern has a significant human component.
• All software serves human comfort or quality of life; the best patterns explicitly
appeal to aesthetics and utility.
Frameworks
• A single framework typically encompasses several design patterns and can be viewed
as the implementation of a system of design patterns.
• The main motivation here is to combine the best practices, processes, methodologies,
and guidelines along with UML notations and diagrams.
• The unified approach to software development revolves around (but is not limited to)
the following processes and components.
UA Object-Oriented Design
• The UA encourages the integration of testing plans from day 1 of the project.
• Usage scenarios or Use Cases can become test scenarios; therefore, use cases
will drive the usability testing.
Modeling Based on the Unified Modeling Language
• The UA uses the unified modeling language (UML) to describe and model the
analysis and design phases of system development.
Two-Layer Architecture
In a two-layer system, user interface screens are tied directly to the data through routines that
sit directly behind the screens
Name
Address
Title
Owner Data
Workstation
This approach results in objects that are very specialized and cannot be reused easily in
other projects.
Three-Layer Architecture
Name
Address
Title Data
Owner
Workstation
This layer is typically responsible for two major aspects of the applications:
• model the objects of the business and how they interact to accomplish the business
processes.
Access Layer
The access layer contains objects that know how to communicate with the place
where the data actually resides, whether it is a relational database, mainframe,
Internet, or file. The access layer has two major responsibilities: Translate request
Translate result
Three-Layered Architecture
Access
Layer
Business
Layer
View
Layer
• The classes‘ structure and their • For example, an order interacts with
relationships to each other frozen inventory to determine product
in time are examples of static models. availability.
Why Modeling?
Advantages of Modeling
Models reduce complexity by separating those aspects that are unimportant from
those that are important.
Models enhance learning.
The cost of the modeling analysis is much lower than the cost of similar
experimentation conducted with a real system.
Manipulation of the model (changing variables) is much easier than manipulating a
real system.
Specifying
Visualizing
Constructing
Documenting
What it is/isn’t?
Is NOT
• A process
• A formalism
Is
UML Diagrams
2. Use-case diagram
4. Implementation diagram:
Use case diagrams are created to visualize the relationships between actors and
use cases
o An actor is someone or some thing that must interact with the system under
development
o A use case is a pattern of behavior the system exhibits
o Use cases are written from an actor point of view
Details what the system must provide to the actor when the
use cases is executed
Class Diagrams
A class diagram describes the types of objects in the system and the various kinds of
static relationships that exist among them.
A graphical representation of a static view on declarative static elements.
A central modeling technique that runs through nearly all object-oriented methods.
The richest notation in UML.
A class diagram shows the existence of classes and their relationships in the logical
view of a system
– Class
– Attributes
– Operations
– Relationships
Associations
Generalization
– Dependency
– Realization
Visibility
Generalization
Dependency
Realization
Interaction diagrams describe how groups of objects collaborate to get the job done.
Interaction diagrams capture the behavior of a single use case, showing the pattern of
interaction among objectsThe purpose of Interaction diagrams is to:
Model interactions between objects
Assist in understanding how a system (a use case) actually works
Verify that a use case description can be supported by the existing classes
Identify responsibilities/operations and assign them to classes
Interaction diagrams:
Sequence diagrams
Collaboration diagrams
Packages
A package is a general purpose grouping mechanism. Can be used to group any UML
element (e.g. use case, actors, classes, components and other packages. Commonly used
for specifying the logical distribution of classes. A package does not necessarily translate
into a physical sub-system.
A statechart diagram (also called a state diagram) shows the sequence of states
that an object goes through during its life in response to outside stimuli and messages. A
statechart diagram is a view of a state machine that models the changing behavior of a state.
Statechart diagrams show the various states that an object goes through, as well as the events
that cause a transition from one state to another.
The common model elements that state chart diagrams contain are:
States
Start and end states
Transitions
Entry, do, and exit actions
A state represents a condition during the life of an object during which it satisfies some
condition or waits for some event. Start and end states represent the beginning or ending
of a process. A state transition is a relationship between two states that indicates when an
object can move the focus of control on to another state once certain conditions are met.
Actions in a Statechart diagram
Each state on a state chart diagram can contain multiple internal actions.
An action is best described as a task that takes place within a state.
There are four possible actions within a state:
On entry
On exit
Do
On event
Idle
lift receiver and get dial tone
State
Dialing
digit(n)
Substates
2.14 Activity Diagram
• Activity Diagram – a special kind of Statechart diagram, but showing the flow from
activity to activity (not from state to state).
Action states - executable, atomic computations (states of the system, each representing the
execution of an action) – cannot be decomposed. Activity states – non-atomic; can be further
decomposed; can be represented by other activity diagrams – a composite whose flow of
control is made up of other activity states and action states
Object Oriented Analysis and Design
Deployment Diagram
Shows the configuration of run-time processing elements and the software processes living
on them. The deployment diagram visualizes the distribution of components across the
enterprise
Identifying actors.
Identifying use cases.
Documentation.
What Is Analysis?
Analysis is the process of transforming a problem definition from a fuzzy set of facts and
myths into a coherent statement of a system‘s requirements. The main objective of the
analysis is to capture:
a complete, unambiguous, and consistent picture of the requirements of the system and
what the system must do to satisfy the users' requirements and needs.
Requirements Difficulties
Three most common sources of requirements difficulties are:
1. Incomplete requirements.
2. Fuzzy descriptions (such as fast response).
3. Unneeded features.
"A Use Case is a sequence of transactions in a system whose task is to yield results
Object Oriented Analysis and Design
of measurable value to an individual actor of the system."
• Use case. Use case is a special flow of events through the system.
• Actors. An actor is a user playing a role with respect to the system.
• In a system. This simply means that the actors communicate with the system's use case.
• A measurable value. A use case must help the actor to perform a task that has some
identifiable value.
• Transaction. A transaction is an atomic set of activities that are performed either fully or
not at all.
Use Associations
The use association occurs when you are describing your use cases and notice that
some of them have common subflows. The use association allows you to extract the common
subflow and make it a use case of its own.
Extends Associations
The extends association is used when you have one use case that is similar to another
use case but does a bit more or Is more specialized; in essence, it is like a subclass.
Library
Performing research
Reading Supplier
books
Newspaper
Purchasing Supplies
Object Oriented Analysis and Design
Types of Use Cases
• Use cases could be viewed as concrete or abstract.
• An abstract use case is not complete and has no initiation actors but is used by a
concrete use case, which does interact with actors.
Identifying the Actors
i. The term actor represents the role a user plays with respect to the system.
ii. When dealing with actors, it is important to think about roles rather than people or job
titles.
iii. Who affects the system? Or,
iv. Which user groups are needed by the system to perform its functions? These functions
can be both main functions and secondary functions, such as administration.
v. Which external hardware or other systems (if any) use the system to perform tasks?
vi. What problems does this application solve (that is, for whom)?
vii. And, finally, how do users use the system (use case)? What are they doing with the
system?
The main objective of the analysis is to capture a complete, unambiguous, and consistent
picture of the requirements of the system. Construct several models and views of the system
Object Oriented Analysis and Design
to describe what the system does rather than how. Capturing use cases is one of the first
things to do in coming up with requirements. Every use case is a potential requirement. The
key in developing effective documentation is to eliminate all repetition; present summaries,
reviews, organization chapters in less than three pages. Use the 80–20 rule: 80 percent of the
work can be done with 20 percent of the documentation.
Object Analysis: Classification
The concept of classification
How to identify classes
Intelligent classification is intellectually hard work and may seem rather arbitrary. Martin
and Odell have observed in object-oriented analysis and design, that “In fact, an object can
be categorized in more than one way.”
Approaches for Identifying Classes
noun phrase approach
common class patterns approach
use-case driven approach
classes, responsibilities, & collaborators (CRC) approach
Noun Phrase Approach
It examine Use cases, conduct interviews, and read requirements specification
carefully, dividing noun phrases into three categories
Sequence Diagram
Request Kind
Enter Kind
Request Amount
Enter Amount
Process Transaction
W ithdraw Checking
Take Cash
Request Continuation
Terminate
Print Receipt
Object Oriented Analysis and Design
Collaboration Diagram
2: Enter Kind
CRC cards are 4" x 6" index cards. All the information for an object is written on a card.
CRC starts with only one or two obvious cards. If the situation calls for a responsibility not
already covered by one of the objects: Add, or create a new object to address that
responsibility.
• The class should describe a single object, so it should be the singular form of noun.
• By the convention, the class name must begin with an upper case letter.
• For compound words, capitalize the first letter of each word - for example,
Loan Window.
Association
Super-sub structure (also known as generalization hierarchy)
Aggregation and a-part-of structure
Top-down
Bottom-up
Reusability
Multiple inheritance
Identifying Class Responsibility by Analyzing Use Cases and Other UML Diagrams
UNIT IV
OBJECT ORIENTED DESIGN
Design axioms
Designing Classes
Access Layer
To explain how a software design may be represented as a set of interacting objects that manage
their own state and operations
Characteristics of OOD
Analysis : Design:
oFocus on understanding oFocus on understanding
the problem the solution
oIdealized design oOperations & attributes
oBehavior operformance
oSystem structure oclose to real code
oFunctional oobject lifecycles
requirements onon-functional
oA small model requirements
oa large model
User
Continue testing satisfaction &
usability tests
based on
use-
OO Design Axioms
An axiom = is a fundamental truth that always is observed to be valid and for which
there is no counterexample or exception.
A theorem = is a proposition that may not be self-evident but can be proven from
accepted axioms. Therefore, is equivalent to a law or principle.
A theorem is valid if its referent axioms & deductive steps are valid.
A corollary = is a proposition that follows from an axiom or another proposition that
has been proven
Suh‘s design axioms to OOD :
Axiom 1 : The independence axiom. Maintain the independence of
components
Axiom 2 : The information axiom. Minimize the information content of the
design.
Axiom 1states that, during the design process, as we go from requirement and
use- case to a system component, each component must satisfy that requirement,
without affecting other requirements
Axiom 2 concerned with simplicity. Rely on a general rule known as
Occam’s razor.
Occam’s razor rule of simplicity in OO terms :
The best designs usually involve the least complex code but not necessarily the
fewest number of classes or methods. Minimizing complexity should be the goal,
because that produces the most easily maintained and enhanced application. In
an object-oriented system, the best way to minimize complexity is to use
inheritance and the system’s built-in classes and to add as little as possible to
what already is there.
Corollaries
May be called Design rules, and all are derived from the two basic axioms :
The origin of collaries as shown in figure 2. Corollaries 1,2 and 3 are from both
axioms, whereas corollary 4 is from axiom 1 and corollaries 5 & 6 are from axiom 2.
Corollary 4
Corollary 1
Axiom 1
Corollary 2
Axiom 2
Corollary 3
Corollary 6 Corollary 5
Very low Data coupling Connection involves either simple data items
or aggregate structures all of whose elements
are used by the receving object. ( this is the
goal of an architectural design)
Characteristics of OOD :
Characteristics of OOD Objects are abstractions of real-world or system entities and
manage themselves Objects are independent and encapsulate state and representation
information.
System functionality is expressed in terms of object services Shared data areas are
eliminated.
Objects communicate by message passing Objects may be distributed and may
execute sequentially or in parallel
Advantages of OOD :
Advantages of OOD Easier maintenance.
Objects may be understood as stand-alone entities Objects are appropriate reusable
components For some systems, there may be an obvious mapping from real world
entities to system objects
Object-oriented development :
Object-oriented development Object-oriented analysis, design and programming are related
but distinct OOA is concerned with developing an object model of the application domain OOD is
concerned with developing an object-oriented system model to implement requirements OOP is
concerned with realising an OOD using an OO programming language such as Java or C++
Objects :
Objects An object is an entity which has a state and a defined set of operations which operate
on that state. The state is represented as a set of object attributes. The operations associated with the
object provide services to other objects (clients) which request these services when some computation
is required. Objects are created according to some object class definition. An object class definition
serves as a template for objects. It includes declarations of all the attributes and services which should
be associated with an object of that class.
Object communication :
Object communication Conceptually, objects communicate by message passing. Messages
The name of the service requested by the calling object. Copies of the information required to execute
the service and the name of a holder for the result of the service. In practice, messages are often
implemented by procedure calls Name = procedure name. Information = parameter list.
Message examples :
Message examples // Call a method associated with a buffer
// in the buffer
v = circularBuffer.Get () ;
// temperature to be maintained
thermostat.setTemp (20) ;
Advantages of inheritance :
Advantages of inheritance It is an abstraction mechanism which may be used to classify
entities It is a reuse mechanism at both the design and the programming level The inheritance graph is
a source of organizational knowledge about domains and systems
UML associations :
UML associations Objects and object classes participate in relationships with other objects
and object classes In the UML, a generalised relationship is indicated by an association Associations
may be annotated with information that describes the association Associations are general but may
indicate that an attribute of an object is an associated object or that a method relies on an associated
object
Concurrent objects :
Concurrent objects The nature of objects as self-contained entities make them suitable for
concurrent implementation The message-passing model of object communication can be implemented
directly if objects are running on separate processors in a distributed system
Java threads :
Java threads Threads in Java are a simple construct for implementing concurrent objects
Threads must include a method called run() and this is started up by the Java run-time system Active
objects typically include an infinite loop so that they are always carrying out the computation
Architectural design :
Architectural design Once interactions between the system and its environment have been
understood, you use this information for designing the system architecture Layered architecture is
appropriate for the weather station Interface layer for handling communications Data collection layer
for managing instruments Instruments layer for collecting data There should be no more than 7
entities in an architectural model
Object identification :
Object identification Identifying objects (or object classes) is the most difficult part of object
oriented design There is no 'magic formula' for object identification. It relies on the skill, experience
and domain knowledge of system designers Object identification is an iterative process. You are
unlikely to get it right first time
Approaches to identification :
Approaches to identification Use a grammatical approach based on a natural language
description of the system (used in Hood method) Base the identification on tangible things in the
application domain Use a behavioural approach and identify objects based on what participates in
what behaviour Use a scenario-based analysis. The objects, attributes and methods in each scenario
are identified
Design models :
Design models Design models show the objects and object classes and relationships between
these entities Static models describe the static structure of the system in terms of object classes and
relationships Dynamic models describe the dynamic interactions between objects.
Subsystem models :
Subsystem models Shows how the design is organised into logically related groups of objects
In the UML, these are shown using packages - an encapsulation construct. This is a logical model.
The actual organisation of objects in the system may be different.
Sequence models :
Sequence models Sequence models show the sequence of object interactions that take place
Objects are arranged horizontally across the top Time is represented vertically so models are read top
to bottom Interactions are represented by labelled arrows, Different styles of arrow represent different
types of interaction A thin rectangle in an object lifeline represents the time when the object is the
controlling object in the system
Statecharts :
Statecharts Show how objects respond to different service requests and the state transitions
triggered by these requests If object state is Shutdown then it responds to a Startup() message In the
waiting state the object is waiting for further messages If reportWeather () then system moves to
summarising state If calibrate () the system moves to a calibrating state A collecting state is entered
when a clock signal is received
Design evolution :
Design evolution Hiding information inside objects means that changes made to an object do
not affect other objects in an unpredictable way Assume pollution monitoring facilities are to be
added to weather stations. These sample the air and compute the amount of different pollutants in the
atmosphere Pollution readings are transmitted with weather data
The main idea behind creating an access layer is to create a set of classes that know how to
communicate with the place(s) where the data actually reside. Regardless of where the data reside,
whether it be a file, relational database, mainframe, Internet, DCOM or via ORB, the access classes
must be able to translate any data-related requests from the business layer into the appropriate
protocol for data access. These classes also must be able to translate the data retrieved back into the
appropriate business objects. The access layer‘s main responsibility is to provide a link between
business or view objects and data storage. Three-layer architecture is similar to 3-tier architecture.
The view layer corresponds to the client tier, the business layer to the application server tier and the
access layer performs two major tasks:
Translate the request: The access layer must be able to translate any data related requests from the
business layer into the appropriate protocol for data access.
•Translate the results: The access layer also must be able to translate the data retrieved back into the
appropriate business objects and pass those objects back into the business layer.
•Here design is tied to any base engine or distributed object technology such as CORBA or DCOM.
Here we can switch easily from one database to another with no major changes to the user interface or
business layer objects. All we need to change are the access classes‘ methods.
A Date Base Management System (DBMS) is a set of programs that enables the creation and
maintenance (access, manipulate, protect and manage) of a collection of related data.
• The purpose of DBMS is to provide reliable, persistent data storage and mechanisms for
efficient, convenient data access and retrieval.
• Persistence refers to the ability of some objects to outlive the programs that created them.
• Object lifetimes can be short for local objects (called transient objects) or long for objects
stored indefinitely in a database (called persistent objects).
Most object-oriented languages do not support serialization or object persistence, which is the process
of writing or reading an object to and from a persistence storage medium, such as disk file.
• Unlike object oriented DBMS systems, the persistent object stores do not support query or
interactive user interface facilities.
• Controlling concurrent access by users, providing ad-hoc query capability and allowing
independent control over the physical location of data are not possible with persistent objects.
• The access layer (AL), which is a key part of every n-tier system, is mainly consist of a simple set of
code that does basic interactions with the database or any other storage device. These functionalities
are often referred to as CRUD (Create, Retrieve, Update, and Delete).
• The data access layer need to be generic, simple, quick and efficient as much as possible. It should not
include complex application/ business logics.
• I have seen systems with lengthy, complex store procedures (SP), which run through several cases
before doing a simple retrieval. They contain not only most part of the business logic, but application
logic and user interface logic as well. If SP is getting longer and complicated, then it is a good
indication that you are burring your business logic inside the data access layer.
• In DBMS, a single repository of data is maintained, which can be defined once and
subsequently accessed
by various users.
• DBMS contains not only the data but a a complete definition of the data formats it manages, known
as Schema or Meta-data, which contains a complete definition of the data formats, such as
the data structures, types and constraints.
• In file processing applications, such meta data are encapsulated in the application programs
themselves.
But in DBMS, the format of the meta-data is independent of any particular application data
structure.
It is used to integrate distributed, heterogeneous business applications and data. The CORBA
interface definition language (IDL) allows developers to specify language-neutral, object-
oriented interfaces for application and system components. IDL definitions are stored in an
interface repository that offers object interfaces and services. For distributed enterprise
computing, the interface repository is central to communication among objects located on
different systems.CORBA implements a communication channel through which applications can
access object interfaces and request data and services. The CORBA common object
environment (COE) provides system level services such as life cycle management for objects
accessed through CORBA, event notification between objects and transaction and concurrency
control.
Jef Raskin suggests that the most important characteristic of an OOUI is that it adopts a
'noun-verb', rather than a 'verb-noun' style of interaction, and that this has several
advantages in terms of usability.
Introduction
Two issues in software quality are:
• Validation or user satisfaction
• Verification or quality assurance.
• Elimination of the syntactical bug is the process of debugging.
• Detection and elimination of the logical bug is the process of testing.
• Error Types:
• Language errors or syntax errors
• Run-time errors
• Logic errors
Debugging Tools
• Debugging tools are a way of looking inside the program to help us determine
what happens and why.
• It basically gives us a snapshot of the current state of the program.
Testing Strategies
There are four types of testing strategies these are:
• Black Box Testing
• White Box Testing
• Top-down Testing
• Bottom-up Testing
Input Output
© Einstein College of
Engineering
• One form of white box testing is called path testing.
• It makes certain that each path in a program is executed at least once during
testing.
Two types of path testing are:
• Statement testing coverage, and
• Branch testing coverage
Top-down Testing
It assumes that the main logic of the application needs more testing than supporting logic.
Bottom-up Approach
• It takes an opposite approach.
• Two main issues in software quality are validation or user satisfaction and
verification or quality assurance.
• The process of designing view layer classes consists of the following steps:
1. In the macro-level user interface (UI) design process, identify view layer objects.
2. In the micro-level UI, apply design rules and GUI guidelines.
3. Test usability and user satisfaction.
4. Refine and iterate the design.
5. Usability and User Satisfaction Testing
Two issues will be discussed:
1. Usability Testing and how to develop a plan for usability testing.
2. User Satisfaction Test and guidelines for developing a plan for user
satisfaction testing.
• The International Organization for Standardization (ISO) defines usability as the
effectiveness, efficiency, and satisfaction with which a specified set of users
can achieve a specified set of tasks in particular environments.
• Defining tasks. What are the tasks?
• Defining users. Who are the users?
• A means for measuring effectiveness, efficiency, and satisfaction.
• The phrase two sides of the same coin is helpful for describing the
relationship between the usability and functionality of a system.
• Usability testing measures the ease of use as well as the degree of comfort
and satisfaction users have with the software.
• Usability testing must begin with defining the target audience and test goals.
• Run a pilot test to work out the bugs of the tasks to be tested.
• Make certain the task scenarios, prototype, and test equipment work smoothly.
Guidelines for Developing Usability Testing
• ―Focus groups" are helpful for generating initial ideas or trying out new ideas.
• It requires a moderator who directs the discussion about aspects of a task or design.
• Apply usability testing early and often.
• Include all of software‘s components in the test.
The testing doesn‘t need to be very expensive, a tape recorder, stopwatch, notepad and an
office can produce excellent results.
• Tests need not involve many subjects.
• More typically, quick, iterative tests with a small, well-targeted sample of 6 to 10
participants can identify 80–90 percent of most design
problems.
• Focus on tasks, not features.
• Remember that your customers will use features within the context of particular
tasks.
• Make participants feel comfortable by explaining the testing process.
• Emphasize that you are testing the software, not the participants.
• If they become confused or frustrated, it is not a reflection on them.
• Do not interrupt participants during a test.
• If they need help, begin with general hints before moving to specific advice.
• Keep in mind that less intervention usually yields better results.
• Record the test results using a portable tape recorder, or better, a video camera.
• You may also want to follow up the session with the user satisfaction
test.
• The test is inexpensive, easy to use and it is educational to those who administer
it and those who fill it out.
Even if the results may never be summarized, or filled out, the process of creating the test
itself will provide us with useful information.
Account ATM Machine:Definition Bank Client