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

SE Practical5

software enginerring material which helps to devlop software tools

Uploaded by

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

SE Practical5

software enginerring material which helps to devlop software tools

Uploaded by

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

Practical – 5

AIM: Prepare the structural view: Draw Class diagram and object diagram.

• Objectives: to learn about UML class diagram and object diagram components.

• Theory:
o 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.

o Purpose of Class Diagrams


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:
1. It analyses and designs a static view of an application.
2. It describes the major responsibilities of a system.
3. It is a base for component and deployment diagrams.
4. It incorporates forward and reverse engineering.
o Benefits of Class Diagrams
1. It can represent the object model for complex systems.
2. It reduces the maintenance time by providing an overview of how an
application is structured before coding.
3. It provides a general schematic of an application for better
understanding.
4. It represents a detailed chart by highlighting the desired code, which is
to be programmed.
5. It is helpful for the stakeholders and the developers.

Vital components of a Class Diagram

The class diagram is made up of three sections:


1. Upper Section: The upper section encompasses the name of the class.
A class is a representation of similar objects that shares the same
relationships, attributes, operations, and semantics. Some of the
following rules that should be taken into account while representing a
class are given below:
1. Capitalize the initial letter of the class name.
2. Place the class name in the center of the upper section.
3. A class name must be written in bold format.
4. The name of the abstract class should be written in italics format.
2. Middle Section: The middle section constitutes the attributes, which
describe the quality of the class. The attributes have the following
characteristics:
1. The attributes are written along with its visibility factors, which
are public (+), private (-), protected (#), and package (~).
2. The accessibility of an attribute class is illustrated by the
visibility factors.
3. A meaningful name should be assigned to the attribute, which
will explain its usage inside the class.
3. Lower Section: The lower section contains methods or operations. The
methods are represented in the form of a list, where each method is
written in a single line. It demonstrates how a class interacts with data.

o Object diagram:
o Object diagrams are dependent on the class diagram as they are derived from
the class diagram. It represents an instance of a class diagram. The objects
help in portraying a static view of an object-oriented system at a specific
instant.
o Both the object and class diagram are similar to some extent; the only
difference is that the class diagram provides an abstract view of a system. It
helps in visualizing a particular functionality of a system.

Notation of an Object Diagram


o Purpose of Object Diagram

The object diagram holds the same purpose as that of a class diagram. The class
diagram provides an abstract view which comprises of classes and their
relationships, whereas the object diagram represents an instance at a particular
point of time.

The object diagram is actually similar to the concrete (actual) system behavior.
The main purpose is to depict a static view of a system.

• Background / Preparation:
How to draw a Class Diagram?

The class diagram is used most widely to construct software applications. It not
only represents a static view of the system but also all the major aspects of an
application. A collection of class diagrams as a whole represents a system.

Some key points that are needed to keep in mind while drawing a class diagram are
given below:

1. To describe a complete aspect of the system, it is suggested to give a meaningful


name to the class diagram.
2. The objects and their relationships should be acknowledged in advance.
3. The attributes and methods (responsibilities) of each class must be known.
4. A minimum number of desired properties should be specified as more number
of the unwanted property will lead to a complex diagram.
5. Notes can be used as and when required by the developer to describe the aspects
of a diagram.
6. The diagrams should be redrawn and reworked as many times to make it correct
before producing its final version.

o How to draw an Object Diagram?


1. All the objects present in the system should be examined before start drawing
the object diagram.
2. Before creating the object diagram, the relation between the objects must be
acknowledged.
3. The association relationship among the entities must be cleared already.
4. To represent the functionality of an object, a proper meaningful name should be
assigned.
5. The objects are to be examined to understand its functionality.

• Procedure / Steps:
Quiz:

1) How to create domain model?


ANS: To create a domain model:
• Define the domain's scope and boundaries.
• Identify entities (objects or concepts) within the domain.
• Specify attributes for each entity.
• Determine relationships between entities.
• Visualize the model using diagrams, document it, and seek expert feedback for
refinement.

2) When to Use: Class Diagrams.


ANS: Use class diagrams during the design and analysis phases of software development
to illustrate the structure of a system, including its classes, attributes, and relationships.
They are valuable when you want to represent the static structure of a system, including
the classes, their attributes, methods, and how they interact. Class diagrams are also
helpful for documenting and communicating the architecture and design of a system to
stakeholders and developers.

3) Define Object diagram.


ANS: An object diagram is a specific instance of a class diagram in UML, showing
objects and their relationships at a particular point in time.

Suggested Reference:

1) Domain Analysis.
2) Domain Analysis Using Textual Analysis Approach
3) Domain model
4) Business Modeling – The Domain Model
5) I. Y. Song, K. Yano, J. Trujillo, and S. Luján-Mora. "A Taxonomic Class Modeling
Methodology for Object-Oriented Analysis", In Information Modeling Methods and
Methodologies, Advanced Topics in Databases Series, Ed. (J Krostige, T. Halpin, K. Siau),
Idea Group Publishing, 2004, pp. 216-240.
Rubric wise marks obtained:

Rubrics 1 2 3 4 5 Total

Marks Complete Complete Complete Complete Complete


implementation implementation implementation implementation implementation
as asked as asked as asked as asked as asked

Problem analysis Problem analysis Problem analysis Problem analysis

Development of Development of Development of


the Solution the Solution the Solution

Concept Clarity Concept Clarity


& understanding & understanding

Correct answer to
all questions

Signature of Faculty:

You might also like