Unit 1 Notes
Unit 1 Notes
Introduction to OOAD with OO Basics — Unified Process — UML diagrams — Use Case –Case
study — the Next Gen POS system, Inception -Use case Modelling — Relating Use cases —
include, extend and generalization — When to use Use-cases
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#.
Example:
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 of 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.3 illustrates an Object oriented
software design, by sending messages to instances of the Dice Game and Die classes.
In the real world a player rolls the dice, in the software design the Dice
Game 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 arenot direct models or simulations of the real world.
2. UNIFIED PROCESS
Fig 1.6 Iterative feedback and evolution leads towards the desired system.
less project failure, better productivity, and lower defect rates; shown by
researchinto 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 thatmore closely meets the real needs of the stakeholders
managed complexity; the team is not overwhelmed by "analysis paralysis"
or verylong and complex steps
the learning within an iteration can be methodically used to improve the
developmentprocess itself, iteration by iteration
In complex, changing systems feedback and adaptation are key ingredients for
success.
Feedback from early development, programmers trying to read
specifications, andclient demos to refine the requirements.
Feedback from tests and developers to refine the design or models.
Feedback from the progress of the team tackling early features to refine the
scheduleand estimates.
Feedback from the client and marketplace to re-prioritize the features to
tackle in thenext iteration.
2.3 UP Disciplines
Disciplines is 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.
There are several disciplines in the UP
Development Case:
The choice of practices and UP artifacts for a projectmay be written up in a short
document called the Development Case (an artifact in the Environment discipline).
3. UML DIAGRAMS
b. State Chart Diagram - describes the states and state transitions of the
system.
4. USE CASE
List any two common ways to relate use cases and give suitable examples.(2)
[NOV/DEC 2020]
A use case describes a function that a system performs to achieve the user’s goal. A
use case must yield an observable result that is of value to the user of the system.
Actor:
An actor represents a role of a user that interacts with the system that you are
modelling. The user can be a human user, an organization, a machine, or another
external system.
5.CASE STUDY
Applications can collaborate with other software or hardware components and contain
user interface (UI) components, core application logic, database access, and database
access. With some discussion of the other layers in support, this OOAD introduction
mostly focuses on the fundamental application logic layer.
A POS system is a computerized application used (in part) to record sales and
handlepayments; 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
andinventory 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 thebusiness 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.
Create a commercial POS system that sells 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.
6.INCEPTION
What artifacts may start in Inception? How much UML is required during
Inception?(10)
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 theservice 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.
Artifact Comment
Vision and Business Describes the high-level goals and constraints, the business
Case 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% ofthe use cases will be analyzed in detail.
Supplementar Describes other requirements, mostly non-functional.
ySpecification During inception, it is useful to have some idea of the key
non- functional requirements that have will have a major
impact onthe architecture.
Glossary Key domain terminology, and data dictionary.
Risk List & Risk Describes the risks (business, technical, resource, schedule)
Management andideas for their mitigation or response.
Plan
Prototypes and proof- To clarify the vision, and validate technical ideas.
of-concepts
Iteration Plan Describes what to do in the first elaboration iteration.
Phase Plan & Low-precision guess for elaboration phase duration
Software andeffort. Tools, people, education, and other
Development Plan resources.
Activities in Inception:
7. USECASE MODELLING
Use cases are text stories, widely used to discover and record requirements. use cases
are text stories of some actor using a system to meet goals. There are 3 formats to
represent the use case
I) Brief Format
II) Casual Format
III) Fully Dressed Format
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.
Lack of user involvement in software projects is near the top of the list of
reasons for project failure. Use cases are a good way to help keep it simple, and
make it possible for domain experts or requirement donors to themselves
write use cases.
Another value of use cases is that they emphasize the user goals and
perspective; we ask the question "Who is using the system, what are their
typical scenarios of use, and what are their goals?" This is a more user-centric
emphasis compared to simply asking for a list of system features.
1. Primary actor has user goals fulfilled through using services of the SuD. For
example, the cashier.
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.
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.
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.
leaves with the items. Notice that use cases are not diagrams, they are text.
Main Success Scenario: A customer arrives at a checkout with items to return. The
cashier uses the POS system to record each returned item …
Alternate Scenarios: If the customer paid by credit, and the reimbursement transaction
to their credit account is rejected, inform the customer and pay them with cash.
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.
Guideline : Write use cases in an essential style; keep the user interface out and
focus onactor 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 common unifying metaphorical theme in object-oriented
thinking software elements have responsibilities and collaborate with other elements
that have responsibilities.
Guideline 4 : Take an Actor and Actor-Goal Perspective : Here's the RUP use
casedefinition, from the use case founder Ivar Jacobson:
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.
Guideline: Identify the primary actors first, as this sets up the framework for
furtherinvestigation. 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 or
thesystem if it fails? performance?
How are software updates handled? Push or pull Who evaluates logs? Are they
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 casediagram.
For example:
In general, define one use case for each user goal. Name the use case similar
to theuser 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 CRUDuse 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
meaningis less strict in that domain. Focus on use cases that reflect EBPs.
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.
Use cases can be related to each other. For example, a sub function use case such as Handle
Credit Payment may be part of several regular use cases, such as Process Sale and Process
Rental.
Example
Regular use cases like Process Sale. Process Rental can have sub functions use case like
HandleCredit Payment.
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 sub function use case, and indicate its inclusion.
Notice that the Handle Credit Payment sub function 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
An abstract use case is never instantiated by itself; it is a sub function 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 sub function 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.
2. The extend Relationship
The idea is to create an extending or addition use case, and within it, describe where and
under what condition it extends the behaviour of some base use case. For example:
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 behaviour and then create two
specialized child use cases which inherit from the parent and which contain the
differences specific to registering on-line and 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.
ACTIVITY SHEET
ACTIVITY SHEET
QUESTION BANK
PART-A
1. What are the three ways and perspectives to Apply UML? [ MAY/JUNE 2015,
NOV/DEC 2015, NOV/DEC 2016, APR/MAY 2017]
2. Define Design Class Diagrams [NOV/DEC 2015,MAY/JUNE 2016]
3. What is Object-Oriented Analysis and Design? [APR/MAY 2011,MAY/JUNE 2013,
NOV/DEC 2013, MAY/JUNE 2014, APR/MAY 2017]
4. What is Inception?
5. Define Use case. [ NOV/JUN 2013, NOV/DEC 2011, APR/MAY 2018]
6. What Tests Can Help Find Useful Use Cases? [ MAY/JUNE 2016,NOV/DEC 2016]
7. Distinguish between method and message in object? [ MAY/JUNE 2015, NOV/DEC
2015]
8. What are the primary goals in the design of UML? [ NOV/DEC 2016]
9. List out the phases of unified process.[NOV/DEC 2021]
10. Define Object Oriented Analysis and Design.[NOV/DEC 2021]
PART-B
1. What do you mean by unified process in OOAD? Explain the phases with suitable
diagrams?
[ APR/MAY 2011,NOV/DEC 2011,MAY/JUNE 2012, NOV/DEC 2012,MAY/JUNE
2013, NOV/DEC 2013, NOV/DEC 2015, MAY/JUNE 2016,NOV/DEC 2016,
APR/MAY 2017, NOV/DEC 2017, NOV/DEC 2021]
9. Explain the benefits and concepts of use case and use case model and analyze the
relating use cases have in ATM system
10. What artifacts may start in Inception? How much UML is required during Inception?
11. Explain in detail about Iterative and Evolutionary Development of unified process
with a suitable example
12. Generalize the concepts of Next Gen POS system? Briefly explain
about Inception Phase.
PART-C
1. A mobile device has to be fitted with an alarm clock. The clock has a display unit
to show the time of day. Using buttons, the user can set the hours and minutes
fields individually. It supports a 24-hour display. It is possible to set one or two
alarms. When an alarm fires, it will sound some noise. The user can turn it off, or
choose to ‘snooze’. If the user does not respond at all the alarm will turn off
itself after 2 minutes. ‘Snoozing’ means to turn off the sound, but the alarm will
fire again after some minutes of delay. This ‘snoozing time’ is pre-adjustable.
Identify the functional requirements for the clock and model it with a use case
diagram.[NOV/DEC 2020]
2. A mobile device has to be fitted with an alarm clock. The clock has a display unit
to show the time of day. Using buttons, the user can set the hours and minutes
fields individually. It supports a 24-hour display. It is possible to set one or two
alarms. When an alarm fires, it will sound some noise. The user can turn it off, or
choose to ‘snooze’. If the user does not respond at all the alarm will turn off
itself after 2 minutes. ‘Snoozing’ means to turn off the sound, but the alarm will
fire again after some minutes of delay. This ‘snoozing time’ is pre-adjustable.
Identify the functional requirements for the clock and model it with a use case
diagram. [NOV/DEC 2021]