0% found this document useful (0 votes)
83 views7 pages

Experiment No 5: Aim: Develop UML Case and Class Diagram For Project

The document discusses developing UML diagrams, including a use case diagram to show actor interactions and goals, and a class diagram to show the static structure of classes and relationships; it explains the basic elements, symbols, and relationships used in each diagram type like actors, use cases, classes, associations, generalizations, and dependencies.

Uploaded by

Tanmay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views7 pages

Experiment No 5: Aim: Develop UML Case and Class Diagram For Project

The document discusses developing UML diagrams, including a use case diagram to show actor interactions and goals, and a class diagram to show the static structure of classes and relationships; it explains the basic elements, symbols, and relationships used in each diagram type like actors, use cases, classes, associations, generalizations, and dependencies.

Uploaded by

Tanmay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Experiment No 5

Aim: Develop UML case and Class diagram for project.

Theory:
Use Case Diagram:
In the Unified Modelling Language (UML), a use case diagram can summarize the details of your
system's users (also known as actors) and their interactions with the system. To build one, you'll use a set
of specialized symbols and connectors. An effective use case diagram can help your team discuss and
represent:
•Scenarios in which your system or application interacts with people, organizations, or external
systems
•Goals that your system or application helps those entities (known as actors) achieve
•The scope of your system
UML use case diagrams are ideal for:
• Representing the goals of system-user interactions
• Defining and organizing functional requirements in a system
• Specifying the context and requirements of a system
Modelling the basic flow of events in a use case Relationships
A model is not complete unless the relationships between elements are described properly. The
Relationship gives a proper meaning to a UML model.
1. Dependency Notation

Dependency is an important aspect in UML elements. It describes the dependent elements and the
direction of dependency. Dependency is represented by a dotted arrow as shown in the following figure.
The arrow head represents the independent element and the other end represents the dependent element.
Dependency is used to represent dependency between two elements of a system
2. Association Notation
Association describes how the elements in a UML diagram are associated. In simple words, it describes
how many elements are taking part in an interaction. Association is represented by a dotted line with
(without) arrows on both sides. The two ends represent two associated elements as shown in the
following figure. The multiplicity is also mentioned at the ends (1, *, etc.) to show how many objects are
associated.

Association is used to represent the relationship between two elements of a system.


3. Generalization Notation
Generalization describes the inheritance relationship of the object-oriented world. It is a parent and child
relationship. Generalization is represented by an arrow with a hollow arrow head as shown in the following
figure. One end represents the parent element and the other end represents the child Anent. Generalization
is used to describe parent-child relationship of two elements of a system.

4. Extensibility Notation
All the languages (programming or modelling) have some mechanism to extend its capabilities such as
syntax, semantics, etc. UML also has the following mechanisms to provide extensibility features.

Use case diagram symbols and notation

Actor specifies a role played by a user or any other system that interacts with the object.

Use case is a list of steps, typically defining interactions between an actor and a system, to achieve a goal.

Package is used to group elements, and to provide a namespace for the grouped elements.

Objects are model elements that represent instances of a class or of classes.


Interfaces are model elements that define sets of operations that other model elements, such as classes, or
components must implement.

Constraint is an extension mechanism that enables you to refine the semantics of a UML model element.

Note contains comments or textual information.

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 modelling method can run
with almost all Object-Oriented Methods.

Essential elements of A UML class diagram

Class Name

The name of the class is only needed in the graphical representation of the class. It appears in the topmost
compartment. A class is the blueprint of an object which can share the same relationships, attributes,
operations, & semantics. The class is rendered as a rectangle, including its name, attributes, and
operations in sperate compartments.
Attributes:An attribute is named property of a class which describes the object being modelled. In the
class diagram, this component is placed just below the name-compartment.

A derived attribute is computed from other attributes. For example, an age of the student can be easily
computed from his/her birth date.

Relationships

Dependency

A dependency means the relation between two or more classes in which a change in one may force
changes in the other. However, it will always create a weaker relationship. 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.
Generalization relationship can't be used to model interface implementation. Class diagram allows
inheriting from multiple super classes.

In this example, the class Student is generalized from Person Class.

Association:

This kind of relationship represents static relationships between classes A and B. For example; an
employee works for an organization.

Here are some rules for Association:

 Association is mostly verb or a verb phrase or noun or noun phrase.


 It should be named to indicate the role played by the class attached at the end of the association
path.
 Mandatory for reflexive associations

In this example, the relationship between student and college is shown which is studies.

Multiplicity

A multiplicity specifies whether the association is mandatory or not. It has some lower bound and upper
bound.

Let's say that that there are 100 students in one college. The college can have multiple students.
Aggregation

Aggregation is a special type of association that models a whole- part relationship between aggregate and

its parts. For example, the class


college is made up of one or more student. In aggregation, the contained classes are never totally
dependent on the lifecycle of the container. Here, the college class will remain even if the student is not

available. Composition:

The composition is a special type of aggregation which denotes strong ownership between two classes
when one class is a part of another class.

Example of class diagram:

Case Diagram for project:


Class Diagram for Project:

Conclusion:

You might also like