SlideShare a Scribd company logo
1 of 22
Object Oriented Programming
Introduction to OOP Design
(Day 1)
Prof. Prasenjit Kumar Das,
Dept. of CST/CSIT, UEM Kolkata
Email : prasenjitdas139@gmail.com
Module 2: Object-Oriented Programming Constructs
 Class, Object
 relationships among classes- association, dependency (use, call), aggregation, grouping,
generalisation
 relationships among objects - instantiation, links
 meta-class
 Modelling with UML Class and Sequence Diagrams
OOP Design
Object-oriented programming (OOP) is a computer programming model
that organizes software design around data, or objects, rather than
functions and logic. An object can be defined as a data field that has
unique attributes and behavior.
Is OOP used in software development?
Object Oriented programming (OOP) is a programming paradigm that
relies on the concept of classes and objects.
 It is used to structure a software program into simple, reusable pieces of
code blueprints (usually called classes), which are used to create individual
instances of objects.
Object Oriented System Development Life Cycle
It consists of three macro processes −
Object Oriented Analysis (OOA)
Object oriented design (OOD)
Object oriented Implementation (OOI)
Object-Oriented Analysis(OOA)
This phase concerns with determining the system requirements and to
understand the system requirements build a use-case model.
 A use-case is a scenario to describe the interaction between user and
computer system. This model represents the user needs or user view of
system.
Object-Oriented Design
The objective of this phase is to design and refine the classes,
attributes, methods, and structures that are identified during the
analysis phase, user interface, and data access.
This phase also identifies and defines the additional classes or objects
that support implementation of the requirement
Object Oriented Implementation
Prototyping
Prototyping enables to fully understand how easy or difficult it will be
to implement some of the features of the system.
Implementation
It uses either Component-Based Development (CBD) or Rapid
Application Development (RAD)
Incremental Testing
Software development and all of its activities including testing are an
iterative process.
Therefore, it can be a costly affair if we wait to test a product only
after its complete development.
Here incremental testing comes into picture wherein the product is
tested during various stages of its development.
Class Diagram Relationships
Class diagrams are the main building blocks of object-oriented modeling so it
is important that you understand the various class diagram relationships and
how they affect your solution.
Classes are interrelated to each other in specific ways. In particular,
relationships in class diagrams include different types of logical connections.
The following are such types of logical connections that are possible in UML
• Association
Association - One of the most common in class diagram relationships
It is a broad term that encompasses just about any logical connection or
relationship between classes. For example, passenger and airline may be
linked as above.
Directed Association
refers to a directional relationship represented by a line with an
arrowhead. The arrowhead depicts a container-contained directional
flow.
Aggregation
refers to the formation of a particular class as a result of one class being
aggregated or built as a collection.
For example, the class “library” is made up of one or more books, among
other materials.
 In aggregation, the contained classes are not strongly dependent on the
lifecycle of the container. In the same example, books will remain so even
when the library is dissolved.
To show aggregation in a diagram, draw a line from the parent class to the
child class with a diamond shape near the parent class.
Composition
A composition association relationship represents a whole–part relationship and is a
form of aggregation.
A composition association relationship specifies that the lifetime of the part classifier is
dependent on the lifetime of the whole classifier.
In a composition association relationship, data usually flows in only one direction (that
is, from the whole classifier to the part classifier).
For example, a composition association relationship connects a Student class with a
Schedule class, which means that if you remove the student, the schedule is also
removed.
Dependency
Using a dependency relationship in UML, one can relate how various
things inside a particular system are dependent on each other.
Dependency is used to describe the relationship between various
elements in UML that are dependent upon each other
Generalization
It is also called a parent-child relationship. In generalization, one element is
a specialization of another general component. It may be substituted for it. It
is mostly used to represent inheritance.
 To show inheritance in a UML diagram, a solid line from the child class to
the parent class is drawn using an unfilled arrowhead
When to Draw Class Diagram?
Most of the UML diagrams can not be mapped directly with any
object-oriented programming languages except class diagrams. In
other words, class diagram ideally can have one to one mapping to
UML class diagrams. Besides, class diagrams are useful in the
following situations:
 Describing the static view of the system.
 Modeling the collaboration among the elements of the static view.
 Describing the functionalities performed by the system.
 Construction of software applications using object oriented languages.
 Performing code forward engineering for the target systems
 Classifying classes or components as library for future reuse
What are the Class Diagrams?
Class diagrams are the main building block in object-oriented
modeling. They are used to show the different objects in a system,
their attributes, their operations and the relationships among them.
The following figure is an example of a Simple class diagram with
attributes and operations
In the example, a class called “loan account” is depicted. Classes in class
diagrams are represented by boxes that are partitioned into three:
The top partition contains the name of the class.
The middle part contains the class’s attributes.
The bottom partition shows the possible operations that are associated with
the class.
The example shows how a class can encapsulate all the relevant data of a
particular object in a very systematic and clear way. A class diagram is a
collection of classes similar to the one above.
Class Diagram For LMS(Library Management
System)
Class Diagram for Library Management System simply describes structure of
Library Management System class, attributes, methods or operations,
relationship among objects.
• Classes of Library Management System :
• Library Management System class –
It manages all operations of Library Management System. It is central part of
organization for which software is being designed.
• User Class –
It manages all operations of user.
• Librarian Class – It manages all operations of Librarian.
• Book Class –
It manages all operations of books. It is basic building block of system.
• Account Class –
It manages all operations of account.
• Library database Class –
It manages all operations of library database.
• Staff Class –
It manages all operations of staff.
• Student Class –
It manages all operations of student.
Attributes of Library Management System :
• Library Management System Attributes –
• UserType, Username, Password
• User Attributes –
• Name, Id
• Librarian Attributes –
• Name, Id, Password, SearchString
• Book Attributes –
• Title, Author, ISBN, Publication
• Account Attributes –
• no_borrowed_books, no_reserved_books, no_returned_books, no_lost_books fine_amount
• Library database Attributes –
• List_of_books
• Staff Class Attributes –
• Dept
• Student Class Attributes –
• Class
Methods of Library Management System :
• Library Management System Methods –
• Login(), Register(), Logout()
• User Methods –
• Verify(), CheckAccount(), get_book_info()
• Librarian Methods –
• Verify_librarian(), Search()
• Book Methods –
• Show_duedt(), Reservation_status(), Feedback(), Book_request(), Renew_info()
• Account Methods –
• Calculate_fine()
• Library database Methods –
• Add(), Delete(), Update(), Display(), Search()
OOP Design Class Diagram Relationships

More Related Content

Similar to OOP Design Class Diagram Relationships

Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdfSHIVAM691605
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software EngineeringAmit Singh
 
Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology IJCSIS Research Publications
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxviju001
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manualPraseela R
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Languagesurana college
 
Different Types Diagrams
Different Types Diagrams  Different Types Diagrams
Different Types Diagrams ShauryaGupta38
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAravinth NSP
 
Uml diagram assignment help
Uml diagram assignment helpUml diagram assignment help
Uml diagram assignment helpsmithjonny9876
 
UML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptxUML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptxNwabueze Obioma
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational RoseMunaam Munawar
 

Similar to OOP Design Class Diagram Relationships (20)

Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
 
Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology
 
Sda 7
Sda   7Sda   7
Sda 7
 
Uml.pptx
Uml.pptxUml.pptx
Uml.pptx
 
Software Testing and UML Lab
Software Testing and UML LabSoftware Testing and UML Lab
Software Testing and UML Lab
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptx
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Different Types Diagrams
Different Types Diagrams  Different Types Diagrams
Different Types Diagrams
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
System modeling
System modelingSystem modeling
System modeling
 
OOM Unit I - III.pdf
OOM Unit I - III.pdfOOM Unit I - III.pdf
OOM Unit I - III.pdf
 
DISE - OOAD Using UML
DISE - OOAD Using UMLDISE - OOAD Using UML
DISE - OOAD Using UML
 
Uml diagram assignment help
Uml diagram assignment helpUml diagram assignment help
Uml diagram assignment help
 
UML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptxUML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptx
 
Ooad
OoadOoad
Ooad
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
 

Recently uploaded

HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 

Recently uploaded (20)

HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 

OOP Design Class Diagram Relationships

  • 1. Object Oriented Programming Introduction to OOP Design (Day 1) Prof. Prasenjit Kumar Das, Dept. of CST/CSIT, UEM Kolkata Email : prasenjitdas139@gmail.com
  • 2. Module 2: Object-Oriented Programming Constructs  Class, Object  relationships among classes- association, dependency (use, call), aggregation, grouping, generalisation  relationships among objects - instantiation, links  meta-class  Modelling with UML Class and Sequence Diagrams
  • 3. OOP Design Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior. Is OOP used in software development? Object Oriented programming (OOP) is a programming paradigm that relies on the concept of classes and objects.  It is used to structure a software program into simple, reusable pieces of code blueprints (usually called classes), which are used to create individual instances of objects.
  • 4. Object Oriented System Development Life Cycle It consists of three macro processes − Object Oriented Analysis (OOA) Object oriented design (OOD) Object oriented Implementation (OOI) Object-Oriented Analysis(OOA) This phase concerns with determining the system requirements and to understand the system requirements build a use-case model.  A use-case is a scenario to describe the interaction between user and computer system. This model represents the user needs or user view of system.
  • 5. Object-Oriented Design The objective of this phase is to design and refine the classes, attributes, methods, and structures that are identified during the analysis phase, user interface, and data access. This phase also identifies and defines the additional classes or objects that support implementation of the requirement Object Oriented Implementation Prototyping Prototyping enables to fully understand how easy or difficult it will be to implement some of the features of the system.
  • 6. Implementation It uses either Component-Based Development (CBD) or Rapid Application Development (RAD) Incremental Testing Software development and all of its activities including testing are an iterative process. Therefore, it can be a costly affair if we wait to test a product only after its complete development. Here incremental testing comes into picture wherein the product is tested during various stages of its development.
  • 7. Class Diagram Relationships Class diagrams are the main building blocks of object-oriented modeling so it is important that you understand the various class diagram relationships and how they affect your solution. Classes are interrelated to each other in specific ways. In particular, relationships in class diagrams include different types of logical connections. The following are such types of logical connections that are possible in UML
  • 8. • Association Association - One of the most common in class diagram relationships It is a broad term that encompasses just about any logical connection or relationship between classes. For example, passenger and airline may be linked as above.
  • 9. Directed Association refers to a directional relationship represented by a line with an arrowhead. The arrowhead depicts a container-contained directional flow.
  • 10. Aggregation refers to the formation of a particular class as a result of one class being aggregated or built as a collection. For example, the class “library” is made up of one or more books, among other materials.  In aggregation, the contained classes are not strongly dependent on the lifecycle of the container. In the same example, books will remain so even when the library is dissolved. To show aggregation in a diagram, draw a line from the parent class to the child class with a diamond shape near the parent class.
  • 11. Composition A composition association relationship represents a whole–part relationship and is a form of aggregation. A composition association relationship specifies that the lifetime of the part classifier is dependent on the lifetime of the whole classifier. In a composition association relationship, data usually flows in only one direction (that is, from the whole classifier to the part classifier). For example, a composition association relationship connects a Student class with a Schedule class, which means that if you remove the student, the schedule is also removed.
  • 12. Dependency Using a dependency relationship in UML, one can relate how various things inside a particular system are dependent on each other. Dependency is used to describe the relationship between various elements in UML that are dependent upon each other
  • 13.
  • 14. Generalization It is also called a parent-child relationship. In generalization, one element is a specialization of another general component. It may be substituted for it. It is mostly used to represent inheritance.  To show inheritance in a UML diagram, a solid line from the child class to the parent class is drawn using an unfilled arrowhead
  • 15. When to Draw Class Diagram? Most of the UML diagrams can not be mapped directly with any object-oriented programming languages except class diagrams. In other words, class diagram ideally can have one to one mapping to UML class diagrams. Besides, class diagrams are useful in the following situations:  Describing the static view of the system.  Modeling the collaboration among the elements of the static view.  Describing the functionalities performed by the system.  Construction of software applications using object oriented languages.  Performing code forward engineering for the target systems  Classifying classes or components as library for future reuse
  • 16. What are the Class Diagrams? Class diagrams are the main building block in object-oriented modeling. They are used to show the different objects in a system, their attributes, their operations and the relationships among them. The following figure is an example of a Simple class diagram with attributes and operations
  • 17. In the example, a class called “loan account” is depicted. Classes in class diagrams are represented by boxes that are partitioned into three: The top partition contains the name of the class. The middle part contains the class’s attributes. The bottom partition shows the possible operations that are associated with the class. The example shows how a class can encapsulate all the relevant data of a particular object in a very systematic and clear way. A class diagram is a collection of classes similar to the one above.
  • 18. Class Diagram For LMS(Library Management System) Class Diagram for Library Management System simply describes structure of Library Management System class, attributes, methods or operations, relationship among objects. • Classes of Library Management System : • Library Management System class – It manages all operations of Library Management System. It is central part of organization for which software is being designed. • User Class – It manages all operations of user. • Librarian Class – It manages all operations of Librarian. • Book Class – It manages all operations of books. It is basic building block of system.
  • 19. • Account Class – It manages all operations of account. • Library database Class – It manages all operations of library database. • Staff Class – It manages all operations of staff. • Student Class – It manages all operations of student.
  • 20. Attributes of Library Management System : • Library Management System Attributes – • UserType, Username, Password • User Attributes – • Name, Id • Librarian Attributes – • Name, Id, Password, SearchString • Book Attributes – • Title, Author, ISBN, Publication • Account Attributes – • no_borrowed_books, no_reserved_books, no_returned_books, no_lost_books fine_amount • Library database Attributes – • List_of_books • Staff Class Attributes – • Dept • Student Class Attributes – • Class
  • 21. Methods of Library Management System : • Library Management System Methods – • Login(), Register(), Logout() • User Methods – • Verify(), CheckAccount(), get_book_info() • Librarian Methods – • Verify_librarian(), Search() • Book Methods – • Show_duedt(), Reservation_status(), Feedback(), Book_request(), Renew_info() • Account Methods – • Calculate_fine() • Library database Methods – • Add(), Delete(), Update(), Display(), Search()