Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

UNIT TWO

Rating
-
Sold
-
Pages
34
Uploaded on
11-10-2022
Written in
2022/2023

Lecture notes of 34 pages for the course Object Oriented System Design at Guru Gobind Sing Indraprastha University (UNIT 2)

Institution
Course

Content preview

UNIT 2

1. Class
A class is a template or description for similar objects. Similar means objects have same
attributes, operations, responsibilities and semantics. These classes may belong to problem
domain or may belong to the solution or implementation for the problem. The graphical
representation of a class in UML is a rectangle.

Example:




2. Relationships in UML
It depict a connection between several things, such as structural, behavioural, or grouping
things in the unified modelling language. Since it is termed as a link, it demonstrates how
things are interrelated to each other at the time of system execution

2.1 Dependency- Whenever there is a change in either the structure or the behavior of the
class that affects the other class, such a relationship is termed as a dependency. Or, simply,
we can say a class contained in other class is known as dependency. It is a unidirectional
relationship.




2.2 Association- Association is a structural relationship that represents how two entities are
linked or connected to each other within a system. It can form several types of associations,
such as one-to-one, one-to-many, many-to-one, and many-to-many. A ternary association is
one that constitutes three links. It portrays the static relationship between the entities of two
classes.




An association can be categorized into four types of associations, i.e., bi-directional,
unidirectional, aggregation (composition aggregation), and reflexive, such that an aggregation
is a special form of association and composition is a special form of aggregation. The mostly
used associations are unidirectional and bi-directional.

,2.3 Aggregation- An aggregation is a special form of association. It portrays a part-of
relationship. It forms a binary relationship, which means it cannot include more than two
classes. It is also known as Has-a relationship. It specifies the direction of an object
contained in another object. In aggregation, a child can exist independent of the parent.




2.4 Composition- In a composition relationship, the child depends on the parent. It forms a
two-way relationship. It is a special case of aggregation. It is known as Part-of relationship.




2.5 Generalization- The generalization relationship implements the object-oriented concept
called inheritance or is-a relationship. It exists between two objects (things or entities), such
that one entity is a parent (superclass or base class), and the other one is a child (subclass or
derived class). These are represented in terms of inheritance. Any child can access, update, or
inherit the functionality, structure, and behavior of the parent.




3. Common mechanism in UML
3.1. Specification- Provides a textual statement describing interesting aspects of a system.




3.2. Adornments- Textual/graphical items added to the basic notation of an element.
They are used for explicit visual representation of those aspects of an element that are beyond
the most important.
Examples: The basic notation of association is line, but this could be adorned with additional
details, such as the role names and multiplicity of each end.

,3.3. Common Divisions- In modeling, object-oriented systems get divided in multiple ways.
For example, class vs. object, interface vs. implementation. An object uses the same symbol
as its class with its name underlined.




3.4. Extensibility Mechanisms- Extensibility mechanisms allow extending the language in
controlled ways. They include Stereotypes, Tagged Values and Constraints.




3.4.1Stereotypes- Stereotypes are used to create new building blocks from existing blocks.
New building blocks are domain-specific. Stereotypes are used to extend the vocabulary of a
system. Graphically represented as a name enclosed by guillemots (« »)




3.4.2 Tagged Values- Tagged values are used to add to the information of the element (not of
its instances). Stereotypes help to create new building blocks, whereas tagged values help to
create new attributes. These are commonly used to specify information relevant to code
generation, configuration management and so on.




3.4.3 Constraints- Constraints are used to create rules for the model. Rules that impact the
behavior of the model, and specify conditions that must be met. Can apply to any element in
the model, i.e., attributes of a class, relationship. Graphically represented as a string enclosed

, by braces {....} and placed near the associated elements or connected to that elements by
dependency relationships.




4. Class diagram
The class diagram depicts a static view of an application. It represents the types of objects
residing in the system and the relationships between them. A class consists of its objects, and
also it may inherit from other classes. A class diagram is used to visualize, describe,
document various different aspects of the system, and also construct executable software
code. It shows the attributes, classes, functions, and relationships to give an overview of the
software system. It constitutes class names, attributes, and functions in a separate
compartment that helps in software development. Since it is a collection of classes, interfaces,
associations, collaborations, and constraints, it is termed as a structural diagram.

4.1 Purpose

The main purpose of class diagrams is to build a static view of an application. It is the only
diagram that is widely used for construction, and it can be mapped with object-oriented
languages. It is one of the most popular UML diagrams. Following are the purpose of class
diagrams given below:

 It analyses and designs a static view of an application.
 It describes the major responsibilities of a system.
 It is a base for component and deployment diagrams.
 It incorporates forward and reverse engineering.

4.2 Benefits

 It can represent the object model for complex systems.
 It reduces the maintenance time by providing an overview of how an application is
structured before coding.
 It provides a general schematic of an application for better understanding.
 It represents a detailed chart by highlighting the desired code, which is to be
programmed.
 It is helpful for the stakeholders and the developers.

4.3 Vital components

The class diagram is made up of three sections:

Written for

Institution
Course

Document information

Uploaded on
October 11, 2022
Number of pages
34
Written in
2022/2023
Type
Class notes
Professor(s)
Ayasha malik
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
ayashamalik

Get to know the seller

Seller avatar
ayashamalik DTC
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
10
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions