SE Unit 2
SE Unit 2
SE Unit 2
Introduction to UML
• UML is a standard language for specifying,
visualizing, constructing, and documenting the
artifacts of software systems.
• UML was created by the Object Management
Group (OMG)
• UML stands for Unified Modeling Language.
• UML is different from the other common
programming languages such as C++, Java, COBOL,
etc.
• UML is a pictorial language used to make software
blueprints.
• UML can be described as a general purpose visual
modeling language to visualize, specify, construct,
and document software system.
A Conceptual Model of UML
• A conceptual model can be defined as a model
which is made of concepts and their relationships.
• A conceptual model is the first step before
drawing a UML diagram.
• It helps to understand the entities in the real
world and how they interact with each other.
• The conceptual model of UML can learning by
following three major elements −
• UML building blocks.
• Rules to connect the building blocks.
• Common mechanisms of UML.
The building blocks of UML
• The building blocks of UML can be defined as
1. Things
2. Relationships
3. Diagrams
1. Things: Anything that is a real world
entity or object is termed as things. It
can be divided into several different
categories
I. Structural
II. Behavioral
III. Grouping
IV. Annotational
I. Structural Things
• Structural things: define the static part of the
model.
• They represent the physical and conceptual
elements. Following are the brief descriptions
of the structural things.
• Class Diagram
• Objects diagrams
• Deployment diagrams
• Package diagrams
• Component diagram
Class Diagram.
• What is Class?
• A Class is a blueprint that is used to create Object. The Class
defines what object can do.
• What is Class Diagram?
• Class Diagram gives the static view of an application.
• A class diagram describes the types of objects in the system
and the different types of relationships that exist among
them.
• This modeling method can run with almost all
Object-Oriented Methods.
• This Diagram includes the class name, attributes, and
operation in separate designated compartments.
• Class Diagram helps construct the code for the software
application development.
Essential elements of A UML class
diagram
• Class Name
• Attributes
• Operations
AddData()
Relationships
• There are mainly three kinds of relationships in
UML:
• Dependencies
• Generalizations
• Associations
Dependiencies
• Dependency indicates that one class depends
on another.
• In the following example, Student has a
dependency on College
Generalization:
• A generalization helps to connect a subclass to
its superclass.
• A sub-class is inherited from its superclass.
Class diagram allows inheriting from multiple
superclasses.
Association
• This kind of relationship represents static
relationships between classes A and B.
• For example; an student studies in college.
Aggregation vs. Composition
Example of Class Diagram
Best practices of Designing of the
Class Diagram
• The name given to the class diagram must be
meaningful. Moreover, It should describe the real
aspect of the system.
• The relationship between each element needs to be
identified in advance.
• The responsibility for every class needs to be
identified.
• For every class, minimum number of properties should
be specified. Therefore, unwanted properties can
easily make the diagram complicated.
• At the end of the drawing, it must be understandable
for the software development team.
• Lastly, before creating the final version, the diagram
needs to be drawn on plain paper. Moreover, It should
be reworked until it is ready for final submission.
Case Study For Library Management System
• First the management of the library approached this ABC Software Ltd. for their
request for the new automated system. What they stated in their request was that
they needed a system for their library that could automate its various functions. And
provide faster response.
• From this request statement, it is very difficult for the analyst to know what exactly
the customer wants. So in order to get information about the system, the analyst
visits the library site and meets the staff of the library. Library staff is going to be the
end user of the system. Analyst asks various questions from the staff so that the
exact requirements for the system become clear. From this activity, the analyst is
able to identify the following requirements for the new system:
• Function for issue of books
• Function for return of books that can also calculate the fine if the book is returned
after the due date
• Function for performing different queries
• Report generation functions
• Function for maintaining account s
• Maintaining the details for members, books, and suppliers in some structured way.
• Now that the requirements are known, the analyst proposes solution system.
• Solution: The desired system can be implemented with Oracle RDBMS in the back
end with Visual Basic as the front end. It will have modules for handling issue and
return functions, generating reports, performing checks, and maintaining accounts. It
will also store the data relating to books, members, and suppliers in a structures way.
In our case, the data will be maintained in a relational way.
Object Diagram
• Object diagrams are derived from class
diagrams so object diagrams are dependent
upon class diagrams.
• Object diagrams represent an instance of a
class diagram.
Purpose Object Diagrams?
• An object diagram is a diagram that shows
a complete or partial view of the structure of
a modeled system at a specific time.”
Class Diagram vs. Object Diagram
• In UML, object diagrams provide a snapshot of
the instances in a system and the relationships
between the instances.
• In a class diagram, you can explore the
behavior of a system.
• Object diagrams show specific instances of
those classifiers and the links between those
instances at a point in time.
How to draw an Object Diagram?
• Draw all the necessary class diagrams for the
system.
• Identify the crucial points in time where a
system snapshot is needed.
• Identify the objects which cover crucial
functionality of the system.
• Identify the relationship between objects
drawn.
Uses of an Object Diagram
• Model the static design(similar to class diagrams )
or structure of a system using prototypical
instances and real data.
• During the analysis phase of a project, you might
create a class diagram to describe the structure of
a system and then create a set of object diagrams
as test cases to verify the accuracy and
completeness of the class diagram.
• Helps us to understand the functionalities that the
system should deliver to the users.
• Understand relationships between objects.
• Verify the class diagrams for completeness and
accuracy by using Object Diagrams as specific test
cases.
Deployment Diagram
• To show a physical view of the system then we
use deployment diagram.
• Deployment diagrams are used to visualize the
topology of the physical components of a
system, where the software components are
deployed.
Purpose of Deployment Diagrams
utility
Package Diagram
• Package diagram, a kind of structural diagram,
shows the arrangement and organization of
model elements in middle to large scale
project.
Purpose of Package Diagrams
• Package Diagram can be used to simplify
complex class diagrams, it can group classes
into packages.
• A package is a collection of logically related
UML elements.
• Packages are depicted as file folders and can
be used on any of the UML diagrams.
Behavioral Things
• UML Behavioral Diagrams depict the elements of a
system that are dependent on time and that convey
the dynamic concepts of the system and how they
relate to each other.
• The elements in these diagrams are like the verbs in a
natural language and the relationships that connect
them typically convey the passage of time.
• For example, a behavioral diagram of a vehicle
reservation system might contain elements such as
Make a Reservation, Rent a Car, and Provide Credit
Card Details.
Behavioral Things includes.
• use case diagrams
• Sequence diagram
• state–chart diagrams
• activity diagrams.
Use case diagrams
• Use case diagrams are usually referred to as behavior
diagrams.
• Use cases specify the expected behaviour (what), and not
the exact method of making it happen (how).
• It is an effective technique for communicating system
behavior in the user's terms by specifying all externally
visible system behavior.
• It only summarizes some of the relationships between use
cases, actors, and systems.
• It does not show the order in which steps are performed to
achieve the goals of each use case.
• Use cases represent only functional requirements of a
system
• Describe the manner in which outside things (Actors)
interact at the system boundary
• Describe the response of the system
Actor & Usecase
• An actor represents the roles that the users of the use cases
play.
• An actor may be a person (e.g. student, customer), a device
(e.g. workstation), or another system (e.g. bank, institution).
• Use case represent an outside view of the manner the
elements in a system behave and how they can be used in the
context.
Purpose of Use Case Diagram
• Use case diagrams are typically develop in early
stage of development and people often apply use
case modeling for the following purposes:
• Specify the context of a system
• Capture the requirements of a system
• Validate a systems architecture
• Drive implementation and generate test cases
• Developed by analysts together with domain
experts
Use Case Diagram - Vehicle Sales
Systems
Hotel Management
Sequence diagram
• A sequence diagram simply depicts interaction
between objects in a sequential order i.e. the
order in which these interactions take place.
• These diagrams are widely used by
businessmen and software developers to
document and understand requirements for
new and existing systems.
Sequence Diagram Notations –
• Actors – represents a type of role where it
interacts with the system and its objects.
• Disadvantages:
• LOC is language+ technology dependent.
Function Points
• Function points are one of the most widely used
measures of software size.
• The basis of function points is that the
"functionality " of the system that is; what the
system performs, is the measure of the system
size.
• In function points, the system functionally is
calculated in terms of the number of function it
implements, the number of inputs, the number of
output etc.
• The original formulation for computing the function
points.
• uses the count of five different parameters, namely,
• External Inputs(EI):The data that comes from outside
our system.
• External Outputs(EO): The data that goes out of the
system.
• External Inquiries(EQ): combination of i/p-o/p
resulting in data retrival.
• Internal Logical Files(ILF):Logical related data that is
present within the system
• External Interface Files(EIF): Other Logical data i.e
referenced by the system but present in other system
• Data Functions
• There are two types of data functions −
• Internal Logical Files
• External Interface Files
• Transaction Functions
• External Inputs
• External Outputs
• External Inquiries
Counting Function Points
• Step1:
• Each FP is ranked according to complexity.
• There exists pre-defined weights for each FP in
each category.
Criteria to rank FP
• It depends on organization.
• Depends on past project
Step 2
• Calculate Unadjusted FP by multiplying each FP by
its corresponding weight factor.
• UFP= ∑ ∑(Zij * Wij)
• Where Zij is count of the number of FP units of
category I is classified as complexity.
• Wij is the weight.
• Example 5 EI🡪Low
• 6 EO 🡪 High
• UFP=5*3 + 6*7(This is not final answer for FP) will
calculate in step 3
Step 3
• Calculate final FP
• Final FP= UFP * CAF
• Where Complexity adjustment Factor
• CAF is calculated using 14 aspects of processing
complexity.
• 14 questions answered on a scale of 0 to 5.
• 0🡪 No Influnces/Not valid.
• 1🡪 Incidental
• 2🡪Moderate
• 3🡪Average
• 4🡪 Significant.
• 5🡪 Essential.
• CAF =0.65+0.01 * ∑Fi where Fi🡪Answers you have
given
Numerical
Q) Given the following values, compute FP.
Number of user inputs = 50
Number of user outputs = 40
Number of user enquiries = 35
Number of user files = 06
Number of external interfaces = 04
Assuming all complexity adjustment factors and
weighing factors as average, the function points
for the project will be;
COCOMO Model
• COCOMO model stands for Constructive Cost
Model.
• It is developed by Barry Bohem.
• It is a hierarchy of software cost estimation model.
• Hierarchy has 3 models.
• 1. Basic Model
• 2. Intermediate Model.
• 3. Detailed Model.
Basic Model.
• It estimates the software in a rough and quick
manner.
• Mostly useful for small & medium sized
software.
• 3 modes of development.
• 1. Organic Mode
• 2.semi-Detached Mode
• 3.Embedded Mode.
Intermediate Model.
• The Intermediate Model estimates the
software development effort by using fifteen
cost driver variables besides the size variable
used in Basic COCOMO
• Four areas for drivers
– Product.
– Computer.
– Personnel.
– Project.
Intermediate Model: Cost Driver
Categories
• Product Attributes
– RELY --- Required Software Reliability
– DATA --- Data Base Size
– CPLX --- Software Product Complexity
• Computer Attributes
– TIME --- Execution Time Constraint
– STOR --- Main Storage Constraint
– VIRT --- Virtual Machine Volatility
– TURN --- Computer Turnaround Time
• Personnel Attributes
– ACAP --- Analyst Capability
– AEXP --- Applications Experience
– PCAP --- Programmer Capability
– VEXP --- Virtual Machine Experience
– LEXP --- Programming Language Experience
• Project Attributes
– MODP --- Modern Programming Practices
– TOOL --- Use of Software Tools
– SCED --- Required Development Schedule
Intermediate Model: When Should
You Use It
• The Intermediate Model can be applied across
the entire software product for easily and
rough cost estimation during the early stage
• or it can be applied at the software product
component level for more accurate cost
estimation in more detailed stages
Effort Adjustment factor
The effort adjustment factor use 15 cost drivers that are
grouped into four categories:
• Product
• Computer/Hardware
• Personnel
• Project