You are on page 1of 5

__________________________________________________________________

Ex No 2: CLASS - DIAGRAM
Date: 16.12.14

__________________________________________________________________

AIM:
To design and implement a class diagram for the given application using star uml – Online
banking and Online Library Management.

DESCRIPTION:
A class diagram in the Unified Modeling Language (UML) is a type of static structure
diagram that describes the structure of a system by showing the system's classes, their attributes,
operations (or methods), and the relationships among objects.

Class: The top part contains the name of the class. It is printed in bold and centered, and the
first letter is capitalized.

Attribute: The middle part contains the attributes of the class. They are left-aligned and the first
letter is lowercase.

Operation: The bottom part contains the methods the class can execute. They are also left-
aligned and the first letter is lowercase

DEPENDENCY:

Dependency is a weaker form of bond which indicates that one class depends on another
because it uses it at some point in time. One class depends on another if the independent class is
a parameter variable or local variable of a method of the dependent class. This is different from
an association, where an attribute of the dependent class is an instance of the independent class

UR12CS045
GENERALIZATION:

A generalization defines a taxonomic relationship between two classifiers: a more general


one and a more specific one. And that means inheritance. For example, when one class extends
another this is called "Generalization" in UML. It is shown as a line with a hollow triangle that
connects two classifiers.

ASSOCIATION:

An association usually means that you have a sentence that describes a relation between two (or
more) classes and this sentence is not like one of the following:

 “the A class extends the B class” or “the B class implements the A interface” (use
Generalization or Realization for this).
 “the A class is an integral part of the B class” or “the B class consists of the A class (and
some other classes)” (use Composition for this).

UR12CS045
AGGREGATION:

Aggregation is a variant of the "has a" association relationship; aggregation is more


specific than association. It is an association that represents a part-whole or part-of relationship.
As a type of association, an aggregation can be named and have the same adornments that an
association can. Aggregation can occur when a class is a collection or container of other classes,
but the contained classes do not have a strong lifecycle dependency on the container.

COMPOSITION:

Composite aggregation defines a relation between composite and composed objects. The
composite object consists (or is made up) of smaller “composed” objects. It creates, modifies and
destroys them. For example: window contains title, table row contains fields. Composition is a
stronger form of aggregation where the whole and parts have coincident lifetimes, and it is very
common for the whole to manage the lifecycle of its parts. From a stylistic point of view,
because aggregation and composition are both specializations of association the guidelines for
associations apply.

REALIZATION:

A realization relationship is a relationship between two model elements, in which one


model element (the client) realizes (implements or executes) the behavior that the other model
element specifies. A realization is a relationship between classes, interfaces, components, and
packages that connects a client element with a supplier element. A realization relationship
between classes and interfaces and between components and interfaces shows that the class

realizes the operations offered by the interface.

UR12CS045
OUTPUT:
1. Online library management System:

UR12CS045
2.Online Banking:

RESULT:
The Class - diagram for Online banking and Online Library Management

is designed and implemented successfully.

UR12CS045

You might also like