3.unit 1
3.unit 1
UNIT I
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 is a combination of data and logic that represents some real world entity. Data are called
attributes ,logic is called as functions. Example: car(object)
Window
Size
Color
Open()
Close()
1.1.2.What is OOAD:
❖ For example, in the case of the flight information system, some of the concepts include
Plane, Flight, and Pilot.
❖ During object-oriented design (or simply, object design) there is an emphasis on defining
software objects and how they collaborate to fulfill the requirements.
❖ For example, a Plane software object may have a tail Number attribute and a
getFlightHistory method.
1.1.3OOAD steps:
❖ Requirements analysis may include a description of related domain processes; these can
be written as use cases.
❖ Use cases are written stories.
❖ They are a popular tool in requirements analysis and are an important part of the Unified
Process.
❖ For example, here is a brief version of the Play a Dice Game use case: Play a Dice Game:
A player picks up and rolls the dice.
❖ If the dice face value total seven, they win; otherwise, they lose.
❖ Object-oriented analysis is concerned with creating a description of the domain from the
perspective of classification by objects.
❖ A decomposition of the domain involves an identification of the concepts, attributes, and
associations that are considered noteworthy.
❖ The result can be expressed in a domain model.
❖ The static view of the class definitions is usually shown with a design class diagram.
This illustrates the attributes and methods of the classes.
❖ Domain model, shows real-world concepts; but DCD shows software classes.
1.2.UNIFIED PROCESS
Advantages of UP:
In risk-driven and client-driven iterative planning, the goals of the early iterations are chosen to
1.2.4. UP Phases:
1.Inception
2.Elaboration
3.Construction.
4.Transition.
1.Inception
2.Elaboration
❖ In this phase the core architecture is iteratively implemented, and high-risk issues are
mitigated, refined vision, iterative implementation of the core architecture, resolution of
high risks, identification of most requirements and scope, more realistic estimates are
made.
3.Construction
Iterative implementation of the remaining lower risk and easier elements, and preparation
for deployment.
4.Transition
1.2.5.UP disciplines:
❖ The UP describes work activities, such as writing a use case, within disciplinesa 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.
❖ The Unified Modeling Language is a visual language for specifying, constructing and
documenting the artifacts of systems.
❖ Unified Modeling Language (UML) is a standardized general-purpose modeling
language in the field of software engineering.
❖ The standard is managed, and was created by, the Object Management Group. UML
includes a set of graphic notation techniques to create visual models of software-intensive
systems.
There are two broad categories of diagrams and they are again divided into subcategories −
1. Structural Diagrams
2. Behavioral Diagrams
1. Structural Diagrams
❖ The structural diagrams represent the static aspect of the system. These static aspects
represent those parts of a diagram, which forms the main structure and are therefore
stable.
❖ These static parts are represented by classes, interfaces, objects, components, and nodes.
The four structural diagrams are
a) Class diagram
b) Object diagram
c) Component diagram
d) Deployment diagram
A)Class Diagram
➢ Class diagrams are the most common diagrams used in UML. Class diagram consists of
classes, interfaces, associations, and collaboration. Class diagrams basically represent the
object-oriented view of a system, which is static in nature.
➢ Active class is used in a class diagram to represent the concurrency of the system.
➢ Class diagram represents the object orientation of a system.
➢ Hence, it is generally used for development purpose. This is the most widely used
diagram at the time of system construction.
b)Object Diagram
➢ Object diagrams can be described as an instance of class diagram. Thus, these diagrams
are more close to real-life scenarios where we implement a system.
➢ Object diagrams are a set of objects and their relationship is just like class diagrams.
They also represent the static view of the system.
➢ The usage of object diagrams is similar to class diagrams but they are used to build
prototype of a system from a practical perspective.
c)Component Diagram
d)Deployment Diagram
➢ Deployment diagrams are a set of nodes and their relationships. These nodes are physical
entities where the components are deployed.
➢ Deployment diagrams are used for visualizing the deployment view of a system. This is
generally used by the deployment team.
2)Behavioral Diagrams
➢ Any system can have two aspects, static and dynamic. So, a model is considered as
complete when both the aspects are fully covered.
➢ Behavioral diagrams basically capture the dynamic aspect of a system. Dynamic aspect
can be further described as the changing/moving parts of a system.
➢ Use case diagrams are a set of use cases, actors, and their relationships. They represent
the use case view of a system.
➢ A use case represents a particular functionality of a system.
➢ Hence, use case diagram is used to describe the relationships among the functionalities
and their internal/external controllers. These controllers are known as actors.
b)Sequence Diagram
c)Collaboration Diagram
e)Activity Diagram
➢ Activity diagram describes the flow of control in a system. It consists of activities and
links. The flow can be sequential, concurrent, or branched.
➢ Activities are nothing but the functions of a system. Numbers of activity diagrams are
prepared to capture the entire flow in a system.
➢ Activity diagrams are used to visualize the flow of controls in a system. This is prepared
to have an idea of how the system will work when executed.
1.4.USE CASES
Use cases are text stories widely used to discover and record requirements. They are text stories
of some actor using a system to meet goals.
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.
Actor: an actor is something with behavior, such as a person (identified by role), computer
system, or organization; for example, a cashier.
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.
❖ Informally then, a use case is a collection of related success and failure scenarios that
describe an actor using a system to support a goal.
For example, here is a casual format use case with alternate scenarios:
Handle Returns
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 (perhaps it is corrupted).
❖ If the system detects failure to communicate with the external accounting system, …
Use case model is the set of all written use cases; it is a model of the system's
functionality and environment.
Use cases are text documents, not diagrams, and use-case modeling is primarily an act of writing
text, not drawing diagrams.
1.Primary actor
Primary actor has user goals fulfilled through using services of the SuD. For example, the
cashier.
2.Supporting actor
3.Offstage actor
Offstage actor has an interest in the behavior of the use case, but is not primary or
supporting; for example, a government tax agency.
Use Case Diagrams The UML provides use case diagram notation to illustrate the names
of use cases can actors, and the relationships between them. It serves as a communication tool
that summarizes the behavior of the system and its actors.
❖ 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
1.5.1Architectural Layers
1.6.INCEPTION
Inception is the initial short step to establish a common vision and basic scope for the
project. Inception is Envision the product scope, vision, and business case.
❖ The intent of inception is to establish some initial common vision for the objectives of the
project, determine if it is feasible, and decide if it is worth some serious investigation in
elaboration.
❖ If it has been decided beforehand that the project will definitely be done, and it is clearly
feasible (perhaps because the team has done projects like this before), then the inception
phase will be especially brief.
❖ It may include the first requirements workshop, planning for the first iteration, and then
quickly moving forward to elaboration.
The purpose of inception is to collect just enough information to establish a common vision,
decide if moving forward is feasible, and if the project is worth serious investigation in the
elaboration phase. Inception focuses on understanding the basic scope and 10% of the
requirements, expressed mostly in text forms.
1.6.4.Undestanding Requirements:
Requirements are capabilities and conditions to which the systemand more broadly, the
project must conform.
Types of Requirements
❖ The Use Case Model describes the proposed functionality of the new system. A Use Case
represents a discrete unit of interaction between a user (human or machine) and the
system.
❖ A Use Case is a single unit of meaningful work; for example login to system, register
with system and create order are all Use Cases.
❖ Each Use Case has a description which describes the functionality that will be built in the
proposed system.
❖ A Use Case may 'include' another Use Case's functionality or 'extend' another Use Case
with its own behavior. Use Cases are typically related to 'actors'.
❖ An actor is a human or machine entity that interacts with the system to perform
meaningful work.
❖ Actors-An Actor is a user of the system.
❖ This includes both human users and other computer systems. An Actor uses a Use
Case to perform some piece of work which is of value to the business.
❖ The set of Use Cases an actor has access to defines their overall role in the system and the
scope of their action. Constraints, Requirements and Scenarios
1. Requirements: These are the formal functional requirements that a Use Case must
provide to the end user. They correspond to the functional specifications found in structured
methodologies. A requirement is a contract that the Use Case will perform some action or
provide some value to the system.
2. Constraints: These are the formal rules and limitations that a Use Case operates under,
and includes pre-post-and invariant conditions. A pre-condition specifies what must have already
occurred or be in place before the Use Case may start. A post-condition documents what will be
true once the Use Case is complete. An invariant specifies what will be true throughout the
time the Use Case operates.
Use cases can be related to each other. Organizing use cases into relationships has no
impact on the behavior or requirements of the system. It is simply an organization mechanism to
improve communication and comprehension of the use cases, reduce duplication of text, and
improve management of the use case documents.
Extensions:
Extensions: 6b.
4. ...
Extensions:
1. ... Extensions:
2. a*. At any time. Customer selects to edit personal information: Edit Personal
Information.
3. b*. At any time. Customer selects printing help: Present Printing Help. 2-1 1 . Customer
cancels: Cancel Transaction Confirmation.
The include relationship can be used for most use case relationship problems.
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 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.
The extend relationship provides an answer. 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.
1 . Payment, step 7. Main Success Scenario: 1 . Customer arrives at a POS checkout with
goods and/or services to purchase. … 7. Customer pays and System handles payment. …
… Trigger: Customer wants to pay with gift certificate. Extension Points: Payment in
Process Sale. Level: Sub function Main Success Scenario: 1 . Customer gives gift certificate to
Cashier. 2. Cashier enters gift certificate ID. …
This is an example of an extend relationship. 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—indirection
yet again.
❖ The Use Case Model describes the proposed functionality of the new system. A Use Case
represents a discrete unit of interaction between a user (human or machine) and the
system.A Use Case is a single unit of meaningful work; for example login to system,
register with system and create order are all Use Cases. A Use Case may 'include' another
Use Case's functionality or 'extend' another Use Case with its own behavior. Use Cases
are typically related to 'actors'.
During object-oriented analysis 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 Plane, Flight, and Pilot.
During object-oriented design (or simply, object design) there is an emphasis on defining
software objects and how they collaborate to fulfill the requirements. The combination of these
two concepts shortly known as object oriented analysis and design.
During object-oriented analysis 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 Plane, Flight, and Pilot.
During object-oriented design (or simply, object design) there is an emphasis on defining
software objects and how they collaborate to fulfill the requirements. The combination of these
two concepts shortly known as object oriented analysis and design.
Analysis emphasizes an investigation of the problem and requirements, rather than a solution.
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.
A static view of the class definitions is usefully shown with a design class diagram. This
illustrates the attributes and methods of the classes.
The Unified Modeling Language is a visual language for specifying, constructing and
documenting the artifacts of systems.
Inception is the initial short step to establish a common vision and basic scope for the Project. It
will include analysis of perhaps 10% of the use cases, analysis of the critical non-Functional
requirement, creation of a business case, and preparation of the development Environment so
that programming can start in the elaboration phase. Inception in one Sentence: Envision the
product scope, vision, and business case.
Some sample artifacts are Vision and Business Case, Use-Case Model, Supplementary
Specification, Glossary, Risk List & Risk Management Plan, Prototypes and proof-ofconcepts
etc.
Requirements are capabilities and conditions to which the system and more broadly, the project
must conform.
1. Functional
2. Reliability
3. Performance
4. Supportability
An actor is something with behavior, such as a person (identified by role), computer system, or
organization; for example, a cashier.
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.
13. Define Use case. 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.
A use case diagram is an excellent picture of the system context; it makes a good context
diagram that is, showing the boundary of a system, what lies outside of it, and how it gets used.
It serves as a communication tool that summarizes the behavior of a system and its actors.
A diagram which is useful to visualize workflows and business processes. These can be a useful
alternative or adjunct to writing the use case text, especially for business use cases that describe
complex workflows involving many parties and concurrent actions.
1.Include
2.Extend
3.Generalize
20.List out the steps for finding use cases. NOV/DEC 2012
An object is a combination of data and logic; the representation of some real-world entity.
Object oriented system development methodology is a way to develop software by building self-
contained modules or objects that can be easily replaced, modified and reused.
Method Message
iii) In an object oriented system, a method is invoked by sending an object a message. An object
understands a message when it can match the message to a method that has the same name as the
message.
PART B QUESTIONS
1.What is the unified process?Is the UP iterative and incrementa?Expalin:
2.Explain about Unified process phases?
3.Explain about use case model for a case study of your choice?
4.List out the various UML diagrams?
5.Write about Inception
6.Discuss about relationships in use case diagrams?
PART C QUESTIONS