











































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












































Analysis e mphasizes an investigation of the problem and requirements, rather than a solution.
For example, if a new online trading system is desired, how will it be used? What are its
functions? "Analysis" is a broad term, best qualified, as in requirements analysis (an
investigation of the requirements) or object-oriented analysis (an investigation of the domain objects).
Design emphasizes a conceptual solution (in software and hardware) that fulfills the
requirements, rather than its implementation. For example, a description of a database schema
and software objects. Design ideas often exclude low-level or "obvious" details obvious to the
intended consumers. Ultimately, designs can be implemented, and the implementation (such as
code) expresses the true and complete realized design.
As with analysis, the term is best qualified, as in object-oriented design or database design. Useful analysis and design have been summarized in the phrase do the right thing (analysis), and
do the thing right (design).
In dealing with object-oriented technology, Object-Oriented Analysis and Design is the method of choice for
the software development life-cycle. It can be applied in the analysis and design phase and provides general
instructions as for what has to be accomplished. In discussing Object-Oriented Analysis and Design the
distinction between these two phases has to be clarified first.
In the phase of OOA the typical question starts with What...? like “What will my program need to do?”,
“What will the classes in my program be?” and “What will each class be responsible for?”. Hence, OOA cares
about the real world and how to model this real world without getting into much detail. Larman describes in
[Lar02] the OOA phase as an investigation of the problem and requirements, rather than finding a solution to
the problem.
In contrast, in the OOD phase, the question typically starts with How...? like “How will this class handle it’s
responsibilities?”, “How to ensure that this class knows all the information it needs?” and “How will classes in
the design communicate?”. The OOD phase deals with finding a conceptual solution to the problem – it is
about fulfilling the requirements, but not about implementing the solution
During object-oriented analysis(OOA) there is an emphasis on finding and describing the objects or concepts in the problem domain. For example, in the case of the flight information system, some of the concepts include Book, Library, and Patron
During software requirement phase, requirement analysis and object analysis, it is a method of
analysis that examines requirements from the perspective of classes and objects as related to problem domain. Object oriented analysis emphasizes the building of real-world model using the
object oriented view of the world.
During object-oriented design (OOD) (or simply, object design) there is an emphasis on
defining software objects and how they collaborate to fulfill the requirements. During user
requirement phase, OOD involves understanding of the application domain and build an object
model. Identify objects; it is methods of design showing process of object oriented
decomposition. Object oriented design is a method of design encompassing the process of
objects oriented decomposition and a notation for depicting logical and physical as well as static
and dynamic models of the system under design. For example, in the library system, a Book software object may have a title attribute and a getChapter method.
Fig: Object-orientation emphasizes representation of objects. Finally, during implementation or object-oriented programming, design objects are implemented, such as a Book class in Java.
During system implementation phase, t is a method of implementation in which programs are organized as cooperative collection of objects, each of which represents an instance of some class and whose classes are all members of a hierarchy of classes united in inheritance relationships. Object oriented programming satisfies the following requirements: It supports objects that are data abstractions with an interface of named operations and a hidden local state. Objects have associated type (class). Classes may inherit attributes from supertype to subtype.
What are physical objects in system?
Objects help establish workable system so work iteratively between use-case & object models
Example of candidate objects Just a Line management wishes to increase security, both in their building and on site, without antagonizing their employees. They would also like to prevent people who are not part of the company from using the Just a Line car park. It has been decide to issue identity cards to all employees, which they are expected to wear while on the Just a Line site. The cards records the name, department and number of the member of staff, and permit access to the Just a Line car park. A barrier and a card reader are placed at the entrance to the car park. The driver of an approaching car insert his or her numbered card in the card reader, which then checks that the card number is known to the Just a Line system. If the card is recognized, the reader sends a signal to raise the barrier and the car is able to enter the car park. At the exit, there is also a barrier, which is raised when a car wishes to leave the car park. When there are no spaces in the car park a sign at the entrance display “Full” and is only switched off when a car leaves. Special visitor’s cards, which record a number and the current date, also permit access to the car park. Visitor’s cards may be sent out in advance, or collected from reception. All visitor’s cards must be returned to reception when the visitor leaves Just a Line.
Candidate objects in given case are:
Candidate objects’ rejection rule
Rejected Candidate objects
Final Objects
D. Define class Attributes and Operations
A number of additional activities can be used which are complimentary to object-oriented analysis and design methodologies. A. Domain Analysis.
B. Scenario Planning or Use-Case Analysis.
For each interesting set of function points, storyboard a scenario to identify the following.
C. CRC Cards.
D. Informal English.
G. Behavior Analysis
OOD transforms the analysis model created using OOA into a design model that serves as a blueprint for software construction. OOD results in a design that achieves a number of different levels of modularity. Subsystems: Major system components. Objects: Data and the operations. Four important software design concepts: o Abstraction o Information Hiding o Functional Independence o Modularity
As stated earlier, analysis is the practice of studying a problem domain, leading to a specification of externally observable behavior.
OOA to OOD
Object- relationship model
Object-Behavior Model
CRC Index Cards
Attributes, operations, collaborators
THE ANALYSIS MODEL
responsibilities design
message design
Class and object design
subsystem design
THE DESIGN MODEL
Use cases
The models of object oriented analysis and design reflect the importance of explicitly capturing
both the class and object hierarchies of the system under design. These models also over the
spectrum of the important design decisions that we must consider in developing a complex
system and so encourage us to craft implementations that embody the five attributes of well formed complex systems.
Fig: Different types of model of OO Development
Booch presents a model of object- oriented development that identifies several relevant perspectives
The classes and objects that form the system are identified in a logical model. For this logical model, again two different perspectives have to be considered A static perspective identifies the structure of classes and objects, their properties and the relationships classes and objects participate in. A dynamic model identifies the dynamic behavior of classes and objects, the different valid states they can be in and the transitions between these states. Besides the logical model, also a physical model needs to be identified. This is usually done later in the system's lifecycle. The module architecture identifies how classes are kept in separately compliable modules and the process architecture identifies how objects are distributed at run-time over different operating system processes and identifies the relationships between those. Again for this physical model a static perspective is defined that considers the structure of module and process architecture and a dynamic perspective identifies process and object activation strategies and inter-process communication. Object-orientation has not, however, emerged fully formed. In fact it has developed over a long period, and continues to change. Descriptive models written in English are often ambiguous Mathematical models often frightens developers though it is good for safety critical system. Graphical models can be seen by the user and other developers, e.g. UML
The Importance of Model Building
The buildings of models have a broad acceptance among all engineering disciplines largely because model building appeals to the principles of decomposition, abstraction and hierarchy. Each model within a design describes a specific aspect/ perspective of the system under consideration, when put together will provide an overall view of the system. Models give us the opportunity to fail under controlled conditions.
are considered noteworthy. The result can be expressed in a domain model that shows the noteworthy domain concepts or objects.
Note that a domain model is not a description of software objects; it is a visualization of the concepts or mental models of a real-world domain. Thus, it has also been called a conceptual
object model. For example, a partial domain model is shown in
Fig: Partial domain model of the dice game
This model illustrates the noteworthy concepts Player, Die, and DiceGame , with their associations and attributes.
Define Interaction Diagrams
Object-oriented design is concerned with defining software objects their responsibilities and collaborations. A common notation to illustrate these collaborations is the sequence diagram (a kind of UML interaction diagram). It shows the flow of messages between software objects, and thus the invocation of methods. For example, the sequence diagram in Figure illustrates an OO software design, by sending messages to instances of the DiceGame and Die classes. Note this illustrates a common real- world way the UML is applied: by sketching on a whiteboard.
Fig: Interaction diagram illustrating messages between software objects.
Notice that although in the real world a player rolls the dice, in the software design the DiceGame object "rolls" the dice (that is, sends messages to Die objects). Software object designs and programs do take some inspiration from real- world domains, but they are not direct models or simulations of the real world.
Define Design Class Diagrams
In addition to a dynamic view of collaborating objects shown in interaction diagrams, a static view of the class definitions is usefully shown with a design class diagram. This illustrates the attributes and methods of the classes. For example, in the dice game, an inspection of the sequence diagram leads to the partial design class diagram shown in fig below. Since a play message is sent to a DiceGame object, the DiceGame class requires a play method, while class Die requires a roll and getFaceValue method.
Fig: design class diagram.
In contrast to the domain model showing real-world classes, this diagram shows software classes. Notice that although this design class diagram is not the same as the domain model, some class names and content are similar.
In this way, OO designs and languages can support a lower representational gap between the
software components and our mental models of a domain. That improves comprehension.
In this section we will present two different types of case study, one is business transaction type problem and other is computer simulation game.
A. Case One: The NextGen POS System
A POS system is a computerized application used (in part) to record sales and handle payments; it is typically used in a retail store. It includes hardware components such as a computer and bar code scanner, and software to run the system. It interfaces to various service applications, such as a third- party tax calculator and inventory control. These systems must be relatively fault-tolerant; that is, even if remote services are temporarily unavailable (such as the inventory system), they must still be capable of capturing sales and handling at least cash payments (so that the business is not crippled). A POS system increasingly must support multiple and varied client-side terminals and interfaces. These include a thin-client Web browser terminal, a regular personal computer with something like a Java Swing graphical user interface, touch screen input, wireless PDAs, and so forth. Furthermore, we are creating a commercial POS system that we will sell to different clients with disparate needs in terms of business rule processing. Each client will desire a unique set of logic to execute at certain predictable points in scenarios of using the system, such as when a new sale is initiated or when a new line item is added. Therefore, we will need a mechanism to provide this flexibility and customization. Using an iterative development strategy, we are going to proceed through requirements, object-oriented
collaboration. Several scenarios (usual & unusual behavior, exceptions) needed to understand all aspects of collaboration & all potential actions.
Use case modeling: expressing high level processes & interactions with customers in a scenario & analyzing it .It gives system uses, system responsibilities
Developing use case is iterative process, when use case model better understood & developed,
start identifying classes & create their relationship
Use case modeling:
Helps in capturing requirements Helps in planning iterations of development Helps in validating systems expressing high level processes & interactions with customers in a scenario & analyzing it It gives system uses, system responsibilities
Scenarios vs Usecase:
How to write a use case
Format of Use case Black-box versus white-box visibility type, use cases are written in varying degrees of formality:
Fully Dressed use case format Various format templates re available for fully dressed use cases. However, perhaps the most
widely used and shared format is the template available at www.usecases.org. The following
example illustrates this style.
Use Case ID: Use Case Name: Primary Actor: Stakeholders and Interests:: Preconditions: Success Guarantee(Postconditions): Main Success Scenario (or Basic Flow):: Extensions (or Alternative Flows):: Special Requirements: Technology and Data Variations List:: Frequency of Occurrence:: Open Issues
Based on a real POS system’s requirements (example of use case text story) Use case ID UC Use case Name Process Sale Primary Actor Cashier Stakeholders and Interests
Sale is saved. Tax is correctly calculated. Accounting and Inventory are updated. Commissions recorded. Receipt is generated. Payment authorization approvals are recorded. Main Success Scenario (or Basic Flow)
7d. Paying by debit... 7e. Customer presents coupons:
Special Requirements:
3a. Item identifier entered by bar code laser scanner (if bar code is present) or keyboard. 3b. Item identifier may be any UPC, EAN, JAN, or SKU coding scheme. 7a. Credit account information entered by card reader or keyboard. 7b. Credit payment signature captured on paper receipt. But within two years, we predict many customers will want digital signature capture. Frequency of Occurrence:
Could be nearly continuous
Open Issues - What are the tax law variations?
Example 2
A use case describes three things:
There are two kinds of use cases:
Steps for Creating a Use Case Model The steps required to create a use case model are