Ooad - Unit I
Ooad - Unit I
Object Oriented analysis and design skills are essential for the creation of well-
designed, robust, and maintainable software using OO technologies and languages such as
Java or C#.
Requirement’s analysis and OOA/D needs to be presented and practiced in the
context of some development process. In this case, an agile (light, flexible) approach to the
well- known Unified Process (UP) is used as the sample iterative development process are
taken. It includes
For example: An employee object knows how to compute salary. To compute an employee
salary, all that is required is to send the compute payroll message to the employee object.
Car
Cost
Colo
r
Make
Mode
l
When we press on the brake pedal of a car, we send a stop message to the car
object. The car object knows how to respond to the stop message since brake have been
designed with specialized parts such as brake pads and drums precisely respond to that
message.
Different object can respond to the same message in different ways. The car,
motorcycle and bicycle will all respond to a stop message, but the actual operations
performed are object specific.
Inheritance:It is the property of object-oriented systems that allow objects to be built from
other objects. Inheritance allows explicitly taking advantage of the commonality of objects
when constructing new classes. Inheritance is a relationship between classes where one class
is the parent class of another (derived) class. The derived class holds the properties and
behavior of base class in addition to the properties and behavior of derived class.
Dynamic Inheritance
Dynamic inheritance allows objects to change and evolve over time. Since
base classes provide properties and attributes for objects, hanging base classes changes the
properties and attributes of a class.
Example:
A window objects change to icon and back again. When we double click the
folder the contents will be displayed in a window and when close it, changes back to icon. It
involves changing a base class between a windows class and icon class.
Multiple Inheritances
Some object-oriented systems permit a class to inherit its state (attributes) and behavior
from more than one super class. This kind or inheritance is referred to as multiple
inheritances.
For example: Utility vehicle inherits the attributes from the Car and Truck classes.
Encapsulation and Information Hiding
Information hiding is the principle of concealing the internal data and
procedures of an object. In C++ , encapsulation protection mechanism with private, public
and protected members.
A car engine is an example of encapsulation. Although engines may differ in
implementation, the interface between the driver and car is through a common protocol.
Polymorphism
Poly 🡪 ”many” Morph 🡪 “form”
Example: In a pay roll system, manager, office worker and production worker objects all
will respond to the compute payroll message, but the actual operations performed are object
specific.
Flown by
Pilot Planes
A pilot “can fly” planes. The inverse of can fly is “is flown by “. Plane “is flown by” pilot
Aggregations: All objects, except the most basic ones, are composed of and may contain
other objects. Breaking down objects in to the objects from which they are composed is de
composition. This is possible because an object attributes need not be simple data fields,
attributes can reference other objects. Since each object has an identity, one object can refer
to other objects. This is known as aggregation. The car object is an aggregation of other
objects such as engine, seat and wheel objects.
Static and Dynamic Binding:
Determining which function has to be involved at compile time is called
static binding. Static binding optimized the calls. (Ex) function call.
The process of determining at run time which functions to involve is termed
dynamic binding. Dynamic binding occurs when polymorphic call is issued. It allows some
method invocation decision to be deferred until the information is known.
Object Persistence:
Objects have a lifetime. They are explicitly created and can exist for a period
of time that has been the duration of the process in which they were created. A file or
database can provide support for objects having a longer lifeline, longer than the duration of
the process for which they are created. This characteristic is called object persistence.
Example: a simple example a "dice game" in which software simulates a player rolling two
dice. If the total is seven, they win; otherwise, they lose.
i) Define Use Cases: Requirements analysis may include stories or scenarios of how
people use the application; these can be written as use cases. They are a popular tool in
requirements analysis. For example, the Play a Dice Game use case:
Play a Dice Game: Player requests to roll the dice. System presents results: If the
dice face value totals seven, player wins; otherwise, player loses.
This model illustrates the important concepts Player, Die, and Dice Game, with their
associations and attributes. 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, the sequence diagram in Figure 1.4 illustrates an OO software design,
by sending messages to instances of the DiceGame and Die classes.
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.
For example, in the dice game, an inspection of the sequence diagram leads to the
partial design class diagram shown in Figure 1.5. Since a play message is sent to a
DiceGame object, the DiceGame class requires a play method, while class Die requires a
roll and get FaceValue method.
UML DIAGRAMS
The Unified Modeling Language is a visual language for specifying, constructing and
documenting the artifacts of systems. The word visual in the definition is a key point -the
UML is the de facto standard diagramming notation for drawing or presenting pictures. The
standard is managed, and was created, by the Object Management Group. It was first added
to the list of OMG adopted technologies in 1997.
1) Class Diagram - describes the structure of a system by showing the system's classes,
their attributes, and the relationships among the classes.
b. State Chart Diagram - describes the states and state transitions of the system.
1) Reverse Engineering: UML tool reads the source or binaries and generates
UML package, class, and sequence diagrams to visualize and better understanding of
existing code in UML diagrams.
The same UML class diagram notation can be used to draw pictures of concepts in the real
world or software classes in Java.
1. Conceptual perspective - the diagrams are interpreted as describing things in a
situation of the real world or domain of interest.
2. Specification (software) perspective - the diagrams (using the same notation as in
the conceptual perspective) describe software abstractions or components with
specifications and interfaces, but no commitment to a particular implementation (for
example, not specifically a class in C# or Java).
3. Implementation (software) perspective - the diagrams describe software
implementations in a particular technology (such as Java).
The UP combines commonly accepted best practices, such as an iterative lifecycle and
risk-driven development, into a cohesive and well-documented process description.
UP for three reasons
A key practice in both the UP and most other modern methods is iterative development.
Notice in this example that there is neither a rush to code, nor a long drawn-out
design step that attempts to perfect all details of the design before programming. The system
may not be eligible for production deployment until after many iterations; for example, 10
or 15 iterations.
Iterative feedback and evolution leads towards the desired system. The requirements and
design instability lowers over time.
less project failure, better productivity, and lower defect rates; shown by research
into iterative and evolutionary methods
early rather than late mitigation of high risks (technical, requirements,
objectives, usability, and so forth)
early visible progress
early feedback, user engagement, and adaptation, leading to a refined system
that more closely meets the real needs of the stakeholders
managed complexity; the team is not overwhelmed by "analysis paralysis" or
very long and complex steps
the learning within an iteration can be methodically used to improve the
development process itself, iteration by iteration
Most iterative methods recommend an iteration length between two and six weeks.
Small steps, rapid feedback, and adaptation are central ideas in iterative
development; long iterations subvert the core motivation for iterative development
and increase project risk.
A very long time-boxed iteration misses the point of iterative development. Short
is good.
Iterations are time-boxed, or fixed in length. For example, if the next iteration is
chosen to be three weeks long, then the partial system must be integrated, tested, and
stabilized by the scheduled date-date slippage is illegal. If it seems that it will be difficult to
meet the deadline, the recommended response is to de-scope-remove tasks or requirements
from the iteration, and include them in a future iteration, rather than slip the completion
date.
In complex, changing systems feedback and adaptation are key ingredients for success.
Agile development methods usually apply time boxed iterative and evolutionary
development, employ adaptive planning, promote incremental delivery, and include other
values and practices that encourage agility rapid and flexible response to change.
1. Our highest priority is to satisfy the customer through early and continuous delivery
of valuable software.
4. Business people and developers must work together daily throughout the project
5. Build projects around motivated individuals. Give them the environment and
support they need, and trust them to get the job done.
6. The most efficient and effective method of conveying information to and within a
development team is face-to-face conversation
7. Working software is the primary measure of progress.
8. Agile processes promote sustainable development.
9. The sponsors, developers, and users should be able to maintain a constant
pace indefinitely
10. Continuous attention to technical excellence and good design enhances agility
11. Simplicity the art of maximizing the amount of work not done is essential
12. The best architectures, requirements, and designs emerge from self-organizing teams.
13. At regular intervals, the team reflects on how to become more effective, then
tunes and adjusts its behavior accordingly.
This example assumes there will ultimately be 20 iterations on the project before delivery:
A UP project organizes the work and iterations across four major phases:
This is not the old "waterfall" or sequential lifecycle of first defining all the
requirements, and then doing all or most of the design. Inception is not a requirements
phase; rather, it is a feasibility phase, where investigation is done to support a decision to
continue or stop.
Similarly, elaboration is a phase where the core architecture is iteratively implemented,
and high-risk issues are mitigated.
The UP Disciplines
Disciplines a set of activities (and related artifacts) in one subject area, such as the
activities within requirements analysis. In the UP, an artifact is the general term for any
work product: code, Web graphics, database schema, text documents, diagrams, models, and
so on. There are several disciplines in the UP:
Definition: the Development Case: The choice of practices and UP artifacts for a project
may be written up in a short document called the Development Case (an artifact in the
Environment discipline).
Discipline Practice Artifact Incep. Elab. Const. Trans.
I1 E1..En C1..Cn T1..T2
Iteration
Business agile modeling req. Domain Model
s
Modeling workshop
Requirements req. workshop vision Use-Case
box exercise dot voting Model s r
Vision s r
Supplementary
s r
Specification
Glossary s r
Design agile modeling test- Design Model s r
driven dev.
SW
Architecture s
Document
Data Model s r
Implementation test-driven dev. pair …
programming
continuous integration
coding standards
Other layers are usually technology/platform dependent. For example, to explore the
OO design of a Web UI or rich client UI layer in Java, we would need to learn in
detail about a framework such as Struts or Swing.
In contrast, the OO design of the core logic layer is similar across technologies.
The essential OO design skills learned in the context of the application logic layer
are applicable to all other layers or components.
The design approach/patterns for the other layers tends to change quickly as
new frameworks or technologies emerge.
Sample layers and objects in an object-oriented system, and the case study focus.
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.
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.
INCEPTION
Inception: The purpose of the inception phase is not to define all the requirements,
or generate a believable estimate or project plan. Most requirements analysis occurs during
the elaboration phase, in parallel with early production-quality programming and testing.
Inception (in one sentence) - Envision the product scope, vision, and business case.
It may include the first requirements workshop, planning for the first iteration,
and then quickly moving forward to elaboration. Common inception artifacts and
indicates the issues they address.
For example, the Use-Case Model may list the names of most of the expected use
cases and actors, but perhaps only describe 10% of the use cases in detail done in the
service of developing a rough high-level vision of the system scope, purpose, and
risks.
Note that some programming work may occur in inception in order to create "proof
of concept" prototypes, to clarify a few requirements via UI-oriented prototypes, and
to do programming experiments for key "show stopper" technical questions.
Table -Sample inception artifacts.
Artifact Comment
Vision and Business Case Describes the high-level goals and constraints, the business case,
and provides an executive summary.
Use-Case Model Describes the functional requirements. During inception, the
names of most use cases will be identified, and perhaps 10%
of the use cases will be analyzed in detail.
Supplementary Describes other requirements, mostly non-functional. During
Specification inception, it is useful to have some idea of the key non-
functional requirements that have will have a major impact on
the architecture.
Glossary Key domain terminology, and data dictionary.
Risk List & Risk Describes the risks (business, technical, resource, schedule) and
Management Plan ideas for their mitigation or response.
Prototypes and To clarify the vision, and validate technical ideas.
proof-of- concepts
Iteration Plan Describes what to do in the first elaboration iteration.
Phase Plan & Software Low-precision guess for elaboration phase duration
Development Plan and effort. Tools, people, education, and other
resources.
Development Case A description of the customized-UP steps and artifacts for
this project. In the UP, one always customizes it for the
project.
Activities in Inception:
Inception is a short step to elaboration. It determines basic feasibility, risk, and scope, to
decide if the project is worth more serious investigation.
A scenario is a specific sequence of actions and interactions between actors and the
system; it is also called a use case instance. It is one particular story of using a system, or
one path through the use case; for example, the scenario of successfully purchasing items
with cash, or the scenario of failing to purchase items because of a credit payment denial.
A use case is a collection of related success and failure scenarios that describe an
actor using a system to support a goal.
Use cases are text documents, not diagrams, and use-case modeling is primarily an
act of writing text, not drawing diagrams.
There are also the Supplementary Specification, Glossary, Vision, and Business
Rules. These are all useful for requirements analysis.
The Use-Case Model may optionally include a UML use case diagram to show the
names of use cases and actors, and their relationships. This gives a nice context
diagram of a system and its environment. It also provides a quick way to list the use
cases by name.
An actor is anything with behavior, including the system under discussion (SuD)
itself when it calls upon the services of other systems. Primary and supporting actors will
appear in the action steps of the use case text. Actors are roles played not only by people,
but by organizations, software, and machines. There are three kinds of external actors in
relation to the SuD:
1. Primary actor has user goals fulfilled through using services of the SuD. For
example, the cashier.
o Why identify? To find user goals, which drive the use cases.
2. Supporting actor provides a service (for example, information) to the SuD. The
automated payment authorization service is an example. Often a computer system,
but could be an organization or person.
o Why identify? To clarify external interfaces and protocols.
3. Offstage actor has an interest in the behavior of the use case, but is not primary or
supporting; for example, a government tax agency.
o Why identify? To ensure that all necessary interests are identified and
satisfied. Offstage actor interests are sometimes subtle or easy to miss unless
these actors are explicitly named.
Brief - Terse one-paragraph summary, usually of the main success scenario. The
prior Process Sale example was brief. It was created during early requirements
analysis, to get a quick sense of subject and scope. May take only a few minutes to
create.
Example: Process Sale: A customer arrives at a checkout with items to purchase.
The cashier uses the POS system to record each purchased item. The system presents a
running total and line-item details. The customer enters payment information, which the
system validates and records. The system updates inventory. The customer receives a receipt
from the system and then leaves with the items. Notice that use cases are not diagrams, they
are text.
If the item identifier is not found in the system, notify the Cashier and suggest
manual entry of the identifier code . If the system detects failure to communicate
with the external accounting system,
Fully Dressed - All steps and variations are written in detail, and there are supporting
sections, such as preconditions and success guarantees. It was created , after many
use cases have been identified and written in a brief format, then during the first
requirements workshop a few (such as 10%) of the architecturally significant and
high-value use cases are written in detail.
- Touch screen UI on a large flat panel monitor. Text must be visible from 1 meter.
- Credit authorization response within 30 seconds 90% of the time.
- Somehow, we want robust recovery when access to remote services
such the inventory system is failing.
- Language internationalization on the text displayed.
- Pluggable business rules to be insertable at steps 3 and 7.
-…
Format Description:
system use case: A use case describes use of one software system
business use case: At a broader scope, use cases can also describe how a business is
used by its customers and partners. Such an enterprise-level process description is
called a business use case.
Level: Use cases are classified as at the user-goal level or the sub function level, among
others.
A user-goal level use case is the common kind that describe the scenarios to fulfill the goals
of a primary actor to get work done.
A subfunction-level use case describes sub steps required to support a user goal, and is
usually created to factor out duplicate sub steps shared by several regular use cases an
example is the subfunction use case Pay by Credit, which could be shared by many regular
use cases.
Primary Actor: The principal actor that calls upon system services to fulfill a goal.
Stakeholders and Interests List It satisfies all the stakeholders' interests. by starting
with the stakeholders and their interests before writing the remainder of the use case, we
have a method to remind us what the more detailed responsibilities of the system should be.
Stakeholders and Interests:
- Cashier: Wants accurate, fast entry and no payment errors, as cash drawer
shortages are deducted from his/her salary.
-…
Preconditions state what must always be true before a scenario is begun in the use case.
Preconditions are not tested within the use case; rather, they are conditions that are assumed
to be true. Typically, a precondition implies a scenario of another use case, such as logging
in, that has successfully completed.
Main Success Scenario and Steps (or Basic Flow) This has also been called the "happy
path" scenario, or the more prosaic "Basic Flow" or "Typical Flow." It describes a typical
success path that satisfies the interests of the stakeholders.
The scenario records the steps, of which there are three kinds:
1. An interaction between actors.
2. A validation (usually by the system).
3. A state change by the system (for example, recording or modifying something).
5. …
Extension scenarios are branches (both success and failure) from the main success
scenario, and so can be notated with respect to its steps 1…N. For example, at Step 3 of the
main success scenario there may be an invalid item identifier, either because it was
incorrectly entered or unknown to the system. An extension is labeled "3a"; it first identifies
the condition and then the response. Alternate extensions at Step 3 are labeled "3b" and so
forth.
An extension has two parts: the condition and the handling.
Guideline: When possible, write the condition as something that can be detected by the
system or an actor.
This extension example also demonstrates the notation to express failures within extensions.
Special Requirements
Guideline : Write use cases in an essential style; keep the user interface out and focus on
actor intent.
Essential Style
Assume that the Manage Users use case requires identification and authentication:
The design solution to these intentions and responsibilities is wide open: biometric readers,
graphical user interfaces (GUIs), and so forth.
In contrast, there is a concrete use case style. In this style, user interface decisions are
embedded in the use case text. The text may even show window screen shots, discuss
window navigation, GUI widget manipulation and so forth. For example:
Guideline 2. Write Terse Use Cases : Delete "noise" words. Even small changes add up,
such as "System authenticates…" rather than "The System authenticates…"
Guideline 3 : Write Black-Box Use Cases : Black-box use cases are the most common and
recommended kind; they do not describe the internal workings of the system, its
components, or design. Rather, the system is described as having responsibilities, which is a
Guideline 4 : Take an Actor and Actor-Goal Perspective : Here's the RUP use case
definition, from the use case founder Ivar Jacobson:
Write requirements focusing on the users or actors of a system, asking about their
goals and typical situations.
Focus on understanding what the actor considers a valuable result.
Use cases are defined to satisfy the goals of the primary actors. Hence, the basic
procedure is:
1. Choose the system boundary. Is it just a software application, the hardware and
application as a unit, that plus a person using it, or an entire organization?
2. Identify the primary actors those that have goals fulfilled through using services of
the system.
4. Define use cases that satisfy user goals; name them according to their goal. Usually,
user-goal level use cases will be one-to-one with user goals, but there is at least one
exception, as will be examined.
The POS system itself is the system under design; everything outside of it is outside
the system boundary, including the cashier, payment authorization service, and so on. For
example, is the complete responsibility for payment authorization within the system
boundary? No, there is an external payment authorization service actor.
Steps 2 and 3: Find Primary Actors and Goals
Guideline: Identify the primary actors first, as this sets up the framework for further
investigation. The following questions helps to identify other actors.
Who starts and stops the system? Who does system administration?
Who does user and security management? Is "time" an actor because the system
does something in response to a time
event?
Is there a monitoring process that restarts Who evaluates system activity
the system if it fails? or performance?
How are software updates handled? Push or Who evaluates logs? Are they
pull update? remotely retrieved?
In addition to human primary actors, are there any Who gets notified when there are
external software or robotic systems that call upon errors or failures?
services of the system?
1. Draw them in a use case diagram, naming the goals as use cases.
2. Write an actor-goal list first, review and refine it, and then draw the use case
diagram.
For example:
… … … …
The answer depends on the system boundary of the system under design, and who we
are primarily designing the system for the viewpoint of the POS system the system services
the goal of a trained cashier (and the store) to process the customer's sale.
Primary actors and goals at different system boundaries.
The customer is an actor, but in the context of the NextGen POS, not a primary actor;
rather, the cashier is the primary actor because the system is being designed to primarily
serve the trained cashier's "power user" goals. The system does not have a UI and
functionality that could equally be used by the customer or cashier. Rather, it is optimized to
meet the needs and training of a cashier.
Another approach to aid in finding actors, goals, and use cases is to identify external
events. What are they, where from, and why? Often, a group of events belong to the same
use case. For example:
In general, define one use case for each user goal. Name the use case similar to the
user goal for example,
Start the name of use cases with a verb. A common exception to one use case per
goal is to collapse CRUD (create, retrieve, update, delete) separate goals into one CRUD
use case, idiomatically called Manage <X>. For example, the goals "edit user," "delete
user," and so forth are all satisfied by the Manage Users use case.
Your boss asks, "What have you been doing all day?" You reply: "Logging in!" Is
your boss happy? If not, the use case fails the Boss Test, which implies it is not strongly
related to achieving results of measurable value. It may be a use case at some low goal level,
but not the desirable level of focus for requirements analysis.
EBP is similar to the term user task in usability engineering, although the meaning
is less strict in that domain. Focus on use cases that reflect EBPs.
A task performed by one person in one place at one time, in response to a business
event, which adds measurable business value and leaves the data in a consistent state,
e.g., Approve Credit or Price Order
The EBP Test is similar to the Boss Test, especially in terms of the measurable
business value qualification.
A use case typically contains many steps, and in the fully dressed format will often
require 3- 10 pages of text. A common mistake in use case modeling is to define just a
single step within a series of related steps as a use case by itself, such as defining a use case
called Enter an Item ID. You can see a hint of the error by its small size the use case name
will wrongly suggest just one step within a larger series of steps, and if you imagine the
length of its fully dressed text, it would be extremely large.
The UML provides use case diagram notation to illustrate the names of use cases
and actors, and the relationships between them
Use case diagrams and use case relationships are secondary in use case work.
Use cases are text documents. Doing use case work means to write text.
Partial use case Diagram - context diagram.
Guideline
Guideline: Diagramming
Notice the actor box with the symbol «actor». This style is used for UML keywords
and stereotypes, and includes guillemet symbols special single-character brackets («actor»,
not <<actor>>)
Notation suggestions.
Kinds of relationships
1. The include Relationship
2. The extend Relationship
3. The generalize Relationship
It is common to have some partial behavior that is common across several use cases. For
example, the description of paying by credit occurs in several use cases, including
Process Sale, Process Rental, Contribute to Lay-away Plan.. Rather than duplicate this
text, it is desirable to separate it into its own subfunction use case, and indicate its
inclusion.
…
UC7: Process Rental
…
Extensions:
Notice that the Handle Credit Payment subfunction use case was originally in the
Extensions section of the Process Sale use case, but was factored out to avoid duplication.
The basic notation is to use the a*, b*, ... style labels in the Extensions section
A concrete use case is initiated by an actor and performs the entire behavior desired
by the actor. These are the elementary business process use cases. For example, Process Sale
is a concrete use case.
An abstract use case is never instantiated by itself; it is a subfunction use case that is
part of another use case. Handle Credit Payment is abstract; it doesn't stand on its own, but
is always part of another story, such as Process Sale.
A use case that includes another use case, or that is extended or specialized by
another use case is called a base use case. Process Sale is a base use case with respect to the
included Handle Credit Payment subfunction use case. On the other hand, the use case that
is an inclusion, extension, or specialization is called an addition use case. Handle Credit
Payment is the addition use case in the include relationship to Process Sale. Addition use
cases are usually abstract. Base use cases are usually concrete.
The idea is to create an extending or addition use case, and within it, describe where and
under what condition it extends the behavior of some base use case. For example:
This is an example of an extend relationship. The use of an extension point, and that
the extending use case is triggered by some condition. Extension points are labels in the
base use case which the extending use case references as the point of extension, so that the
step numbering of the base use case can change without affecting the extending use case.
In the context of use case modeling the use case generalization refers to the relationship
which can exist between two use cases and which shows that one use case (child) inherits
the structure, behavior, and relationships of another actor (parent). The child use case is also
referred to the more specialized use case while the parent is also referred to as the more
abstract use case of the relationship.
For those of you familiar with object-oriented concepts: use cases in UML are classes and
the generalization is simply the inheritance relationship between two use cases by which one
use case inherits all the properties and relationships of another use case.
You can use the generalization relationship when you find two or more use cases which
have common behavior/logic. In this instance, you can describe the common parts in a
separate use case (the parent) which then is specialized into two or more specialized child
use cases.
Example:
If you are creating a payment system which allows students of a training provider to pay for
courses both on-line and by phone, there will many things in common between the two
scenarios: specifying personal info, specifying payment info, etc. However, there would also
be differences between the two. So, the best way to accomplish this is to create one use case
(the parent) which contains the common behavior and then create two specialized child use
cases which inherit from the parent and which contain the differences specific to registering
on-line vs. by phone.
Use case diagrams are valuable for visualizing the functional requirements of a system that
will translate into design choices and development priorities. They also help identify any
internal or external factors that may influence the system and should be taken into
consideration.
Use case diagrams specify the events of a system and their flows. But use case diagram
never describes how they are implemented. Use case diagram can be imagined as a black
box where only the input, output, and the function of the black box is known. Although use
case is not a good candidate for forward and reverse engineering, still they are used in a
slightly different way to make forward and reverse engineering. The same is true for reverse
engineering. Use case diagram is used differently to make it suitable for reverse engineering.
In forward engineering, use case diagrams are used to make test cases and in reverse
engineering use cases are used to prepare the requirement details from the existing
application.