Sei sulla pagina 1di 39

UNIT-1

UNIFIED PROCESS AND USE CASE


DIAGRAMS
Introduction to OOAD WITH OO Basics
Inheritance:
 Inheritance is the process of creating new class from existing class.
 The existing classes are called base class/parent classes/super-classes, and the new
classes are called derived class/child class/ sub class.
Types of Inheritance:
 Single Inheritance: A subclass derives from a single super-class..
 Multiple Inheritance: A subclass derives from more than one super-classes.
 Multilevel Inheritance: A subclass derives from a super-class which in turn derived
from another class and so on.
 Hierarchical Inheritance: A class has a number of subclasses each of which may
have subsequent subclasses, continuing for a number of levels, so as to form a tree
structure.
 Hybrid Inheritance: A combination of multiple and multilevel inheritance so as to
form a lattice structure.
Polymorphism:
 Poly means many. Polymorphism is the ability to take multiple forms.

 In object-oriented paradigm, polymorphism implies using operations in different


ways, depending upon the instance they are operating upon.

 Polymorphism is particularly effective while implementing inheritance.

Generalization & Specialization:


Generalization and Specialization represent a hierarchy of relationship between classes,
where subclasses inherit from super-classes.
Generalization: In this process the common characteristics of classes are combined to
form a class in a higher level hierarchy (ie) subclasses are combined to form a
generalized super class.
Specialization: It is the reverse process of generalization. Here, the distinguishing
features of groups of objects are used to form specialized classes from existing
classes.
The figure given below shows the process of generalization and specialization.
Link: A link represents a connection through which an object collaborate with other
object.

Association: Group of links having common structure and common behaviour.

Degree of an association:
Unary relationship – Connects objects of the same class.
Binary relationship – Connects objects of two classes.
Ternary relationship – Connects objects of three or more classes.
Encapsulation:
Encapsulation is the process of binding both attributes and methods
together with a class.
Data Hiding:
Typically, a class is designed such that its data (attributes) can be
accessed only by its class methods and insulated from direct outside
access. This process of insulating an objects data is called data hiding
or information hiding.
Message Passing:
The features of message passing are:
 Message passing between two objects is generally unidirectional.
 Message passing enables all interaction between objects.
 Objects in different processes can be involved in message passing.
 Message passing essentially involves invoking class methods.
UNIFIED PROCESS
• The Unified Software Development Process or Unified
Process is a popular iterative and incremental software
development process framework.

• The main idea of using unified process is it uses Iterative


and incremental development for software creation.

• It combines commonly accepted best practices, such as an


iterative lifecycle and risk-driven development into
description.
• The Unified Process divides the project into four phases:
 Inception - Approximate vision and extensibility of the project
 Elaboration – Refined vision and iterative implementation of the core
architecture.
 Construction – A stable executable subset of the final product and preparation
for deployment.
 Transition – Testing and deployment.
UP Disciplines (Workflows)
The graph shows the iteration of project development that includes work
in various phases.
UML DIAGRAMS
• UML stands for Unified Modelling Language. UML is a way of
visualizing a software program using a collection of diagrams.

• Using UML we can customize by adding and removing activities based


on the particular needs and available resources for a project.

• UML went through a standardization process with the OMG (Object


Management Group) and now it is an OMG standard group for
modelling software development.

• The UML is a graphical language for


– specifying
– visualizing
– constructing
– documenting
the artifacts ( made by human) of software systems
UML Diagram Types
UML Building Blocks
Aggregation implies a relationship where the child can exist
independently of the parent.

Composition implies a relationship where the child cannot


exist independent of the parent.
Use Case Notations
Actors
• An actor is anything with behaviour, including the system under
discussion (SuD) itself when it calls upon the services of other
systems.

• Actors are not only roles played by people, but organizations,


software, and machines. There are three kinds of external actors in
relation to the SuD:

• Primary actor, has user goals fulfilled through using services of the
SuD.
• Supporting actor, provides a service (for example, information) to
the SuD.
• Offstage actor, has an interest in the behaviour of the use case, but is
not primary or supporting; for example, a government tax agency.
Example
Use Case Diagram for ATM Process
Use Case For Online Shopping
CASE STUDY – THE NEXT
GENERATION POS SYSTEM,
INCEPTION
CASE STUDY POS SYSTEM
• The case study is the Next Gen point-of-sale (POS) system. In this
apparently straightforward problem domain, we shall see that there are
very interesting requirement and design problems to solve.

• 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).
Architectural Layers of Case Study Emphasis
• A typical object-oriented information system is designed in terms
of several architectural layers or subsystems The following is not a
complete list, but provides an example:

• User Interface—graphical interface; windows.

• Application Logic and Domain Objects—software objects


representing domain concepts (for example, a software class
named Sale) that fulfil application requirements.

• Technical Services—general purpose objects and subsystems that


provide supporting technical services, such as interfacing with a
database or error logging.
Main Success Scenario (or Basic Flow):
1. Customer arrives at POS checkout with goods and/or services to
purchase.
2. Cashier starts a new sale.
3. Cashier enters item identifier.
4. System records sale line item and presents item description, price,
and running total.
Price calculated from a set of price rules.
Cashier repeats steps 3-4 until indicates done.
5. System presents total with taxes calculated.
6. Cashier tells Customer the total, and asks for payment.
7. Customer pays and System handles payment.
8. System logs completed sale and sends sale and payment
information to the external Accounting system (for accounting and
commissions) and Inventory system (to update inventory).
9. System presents receipt.
10.Customer leaves with receipt and goods (if any).
The Actor-Goal List
• Record the primary actors and their user goals in an actor-goal list.
Primary Actor and User Goals Depend on System Boundary
• Figure given below shows the Primary actors and goals at different system
boundaries from the viewpoint of POS System
When to use Use-Cases
Representing the goals of system-user interactions.

Defining and organizing functional requirements in


a system.

Specifying the context and requirements of a


system.

Modeling the basic flow of events in a use case.


END OF UNIT - 1

Potrebbero piacerti anche