SlideShare a Scribd company logo
Class Diagram
Introduction
• A class diagram is a static structure that is used in software
engineering.
• Class Diagram shows the classes, attributes, operations, and the
relationship between them.
• Class diagrams are one of the most important diagrams in coding as
they form the basis for component and deployment diagrams and
describe the responsibilities in a system.
• They are also used for the analysis and design of an application and are
also used in forward and reverse engineering.
Example
• Create a class diagram for a web based public library.
A public library typically stores a collection of books, movies, or other library items
available to be borrowed by people living in a community.
• Each library member typically has a library account and a library card with the
account’s ID number, which he/she can use to identify herself to the library.
• A member’s library account records which items the member has borrowed
and the due date for each borrowed item.
• Each type of item has a default rental period, which determines the item’s
due date when the item is borrowed.
• If a member returns an item after the item’s due date, the member owes a late
fee specific for that item, an amount of money recorded in the member’s library
account
Task 1 : Identify the classes and their attributes
Class Diagram for easy understanding and concept
Library has a member
Library contains items
Items can be books or movies
Multiplicity
Class Relationships
1.Generalizations
2.Associations
3.Dependencies
Generalizations
- inheritance
Association
Aggregation and Composition
Example 1
• Draw a relationship “a course consists of 5-20 students and atleast 1
instructor
• Type of relationship
• Multiplicity
Example 2
• Classify the following into generalization (G), association (A), aggregation
(AG), or composition (C):
a) A country has a capital city
b) A dining philosopher uses a fork
c) A file is an ordinary file or a directory file
d) Files contain records
e) A class can have several attributes
f) A relation can be association or generalization
g) A polygon is composed of an ordered set of points
h) A person uses a computer language on a project
Dependencies
Cart
Total price
Showcart()
Product
Product id
Product price
Related Product()
Class Diagram
• The XYZ Bank is introducing a new system to streamline its operations and improve customer
experience. The system will manage customer accounts, transactions, and interactions with
ATMs. Bank offer following functionalities
1. Customer Management:
• The system manages customer information, including the ability to add new customers, remove existing customers,
and associate customers with different types of accounts (e.g., savings, checking).
2. Account Management:
• Each customer can have one or more accounts, and each account is uniquely identified by an account number.
Customers can view the balance of their accounts and perform transactions such as depositing and withdrawing
cash.
3. Transaction Recording:
• The system records all financial transactions within the bank. This includes transactions related to deposits,
withdrawals, and any other financial activities carried out by customers.
4. ATM Operations:
• The bank has deployed Automated Teller Machines (ATMs) at various locations. Each ATM is uniquely identified.
Customers can interact with these ATMs using debit cards to perform transactions, including cash withdrawals and
balance inquiries.
Class Diagram for easy understanding and concept
Class Diagram for easy understanding and concept
Class Diagram for easy understanding and concept
Class Diagram for easy understanding and concept
Class Diagram for easy understanding and concept
Class Diagram for easy understanding and concept

More Related Content

PDF
software engineering Design Patterns.pdf
PPTX
Library_Management_System_Presentation.pptx
PPTX
DATABASE Mnagement System for computer science
PPTX
Project proposal
PPTX
Project proposal
PPTX
LMS.pptx
PPTX
An Introduction To Software Development - Architecture & Detailed Design
software engineering Design Patterns.pdf
Library_Management_System_Presentation.pptx
DATABASE Mnagement System for computer science
Project proposal
Project proposal
LMS.pptx
An Introduction To Software Development - Architecture & Detailed Design

Similar to Class Diagram for easy understanding and concept (20)

PPTX
Data Structure and Algorithms
PPTX
Use Case Modelling.pptx
PDF
E-library mangament system
PDF
Object-oriented analysis and design
PDF
06 Common Software Architectures (1).pdf
PPTX
System Analysis And Design_FinalPPT_NirmishaK
PPTX
Unit-2.pptx
PDF
DE_project_s5_presentation_gtu_sem5_de project
DOCX
online-shopping-portal-project-report (1).docx
PPTX
Unit 2- Data Warehouse Logical Design.pptx
PPTX
Lecture 1.pptx
PPTX
Library Management System
PPTX
UNIT-3_SE_PPT1.pptx software engineering
PPT
Rinkeshkumar Bhagat Portfolio
PPT
Rinkeshkumar Bhagat Portfolio
PDF
Software Engineering : OOAD using UML
PPTX
Mini project suggestion on project topic.pptx
PPTX
UML Design Document Training Learn UML .pptx
PPTX
object oriented programming part inheritance.pptx
Data Structure and Algorithms
Use Case Modelling.pptx
E-library mangament system
Object-oriented analysis and design
06 Common Software Architectures (1).pdf
System Analysis And Design_FinalPPT_NirmishaK
Unit-2.pptx
DE_project_s5_presentation_gtu_sem5_de project
online-shopping-portal-project-report (1).docx
Unit 2- Data Warehouse Logical Design.pptx
Lecture 1.pptx
Library Management System
UNIT-3_SE_PPT1.pptx software engineering
Rinkeshkumar Bhagat Portfolio
Rinkeshkumar Bhagat Portfolio
Software Engineering : OOAD using UML
Mini project suggestion on project topic.pptx
UML Design Document Training Learn UML .pptx
object oriented programming part inheritance.pptx
Ad

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Machine Learning_overview_presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
Teaching material agriculture food technology
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Tartificialntelligence_presentation.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Machine learning based COVID-19 study performance prediction
PPTX
MYSQL Presentation for SQL database connectivity
PDF
cuic standard and advanced reporting.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
A Presentation on Artificial Intelligence
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Machine Learning_overview_presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
Accuracy of neural networks in brain wave diagnosis of schizophrenia
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Empathic Computing: Creating Shared Understanding
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Diabetes mellitus diagnosis method based random forest with bat algorithm
Tartificialntelligence_presentation.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Encapsulation_ Review paper, used for researhc scholars
Machine learning based COVID-19 study performance prediction
MYSQL Presentation for SQL database connectivity
cuic standard and advanced reporting.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A Presentation on Artificial Intelligence
Ad

Class Diagram for easy understanding and concept

  • 2. Introduction • A class diagram is a static structure that is used in software engineering. • Class Diagram shows the classes, attributes, operations, and the relationship between them. • Class diagrams are one of the most important diagrams in coding as they form the basis for component and deployment diagrams and describe the responsibilities in a system. • They are also used for the analysis and design of an application and are also used in forward and reverse engineering.
  • 3. Example • Create a class diagram for a web based public library. A public library typically stores a collection of books, movies, or other library items available to be borrowed by people living in a community. • Each library member typically has a library account and a library card with the account’s ID number, which he/she can use to identify herself to the library. • A member’s library account records which items the member has borrowed and the due date for each borrowed item. • Each type of item has a default rental period, which determines the item’s due date when the item is borrowed. • If a member returns an item after the item’s due date, the member owes a late fee specific for that item, an amount of money recorded in the member’s library account Task 1 : Identify the classes and their attributes
  • 5. Library has a member Library contains items Items can be books or movies
  • 11. Example 1 • Draw a relationship “a course consists of 5-20 students and atleast 1 instructor • Type of relationship • Multiplicity
  • 12. Example 2 • Classify the following into generalization (G), association (A), aggregation (AG), or composition (C): a) A country has a capital city b) A dining philosopher uses a fork c) A file is an ordinary file or a directory file d) Files contain records e) A class can have several attributes f) A relation can be association or generalization g) A polygon is composed of an ordered set of points h) A person uses a computer language on a project
  • 14. Class Diagram • The XYZ Bank is introducing a new system to streamline its operations and improve customer experience. The system will manage customer accounts, transactions, and interactions with ATMs. Bank offer following functionalities 1. Customer Management: • The system manages customer information, including the ability to add new customers, remove existing customers, and associate customers with different types of accounts (e.g., savings, checking). 2. Account Management: • Each customer can have one or more accounts, and each account is uniquely identified by an account number. Customers can view the balance of their accounts and perform transactions such as depositing and withdrawing cash. 3. Transaction Recording: • The system records all financial transactions within the bank. This includes transactions related to deposits, withdrawals, and any other financial activities carried out by customers. 4. ATM Operations: • The bank has deployed Automated Teller Machines (ATMs) at various locations. Each ATM is uniquely identified. Customers can interact with these ATMs using debit cards to perform transactions, including cash withdrawals and balance inquiries.