際際滷

際際滷Share a Scribd company logo
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 wholepart 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
OOP_Module 2.pptx
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 classs 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_Module 2.pptx

More Related Content

Similar to OOP_Module 2.pptx (20)

08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
kebsterz
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
SHIVAM691605
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
Amit 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
Chapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.pptChapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.ppt
SisayNegash4
Chapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.pptChapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.ppt
SisayNegash4
UML Diagrams.pptxUML DiagramsUML DiagramsUML Diagrams
UML Diagrams.pptxUML DiagramsUML DiagramsUML DiagramsUML Diagrams.pptxUML DiagramsUML DiagramsUML Diagrams
UML Diagrams.pptxUML DiagramsUML DiagramsUML Diagrams
BDAVUITBDA
Sda 7
Sda   7Sda   7
Sda 7
AmberMughal5
Chapterunifiedmo 3 UML Class Diagram.docx
Chapterunifiedmo 3 UML Class Diagram.docxChapterunifiedmo 3 UML Class Diagram.docx
Chapterunifiedmo 3 UML Class Diagram.docx
MohammedNouh7
OBJECT ORIENTED CONCEPTS,UML DIAGRAMS,DFD
OBJECT ORIENTED CONCEPTS,UML DIAGRAMS,DFDOBJECT ORIENTED CONCEPTS,UML DIAGRAMS,DFD
OBJECT ORIENTED CONCEPTS,UML DIAGRAMS,DFD
smithaps4
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
Uml.pptx
Uml.pptxUml.pptx
Uml.pptx
AnjaliParihar13
Software Testing and UML Lab
Software Testing and UML LabSoftware Testing and UML Lab
Software Testing and UML Lab
Harsh Kishore Mishra
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
viju001
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
Praseela R
Object_Oriented_Design_Class and Object Diagrams.pptx
Object_Oriented_Design_Class and Object Diagrams.pptxObject_Oriented_Design_Class and Object Diagrams.pptx
Object_Oriented_Design_Class and Object Diagrams.pptx
MNATARAJASURESH
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
surana college
Unified Modeling Language and Examples .pptx
Unified Modeling Language and Examples .pptxUnified Modeling Language and Examples .pptx
Unified Modeling Language and Examples .pptx
abinaya707644
Different Types Diagrams
Different Types Diagrams  Different Types Diagrams
Different Types Diagrams
ShauryaGupta38
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
kebsterz
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
SHIVAM691605
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
Amit 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
Chapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.pptChapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.ppt
SisayNegash4
Chapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.pptChapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.ppt
SisayNegash4
UML Diagrams.pptxUML DiagramsUML DiagramsUML Diagrams
UML Diagrams.pptxUML DiagramsUML DiagramsUML DiagramsUML Diagrams.pptxUML DiagramsUML DiagramsUML Diagrams
UML Diagrams.pptxUML DiagramsUML DiagramsUML Diagrams
BDAVUITBDA
Chapterunifiedmo 3 UML Class Diagram.docx
Chapterunifiedmo 3 UML Class Diagram.docxChapterunifiedmo 3 UML Class Diagram.docx
Chapterunifiedmo 3 UML Class Diagram.docx
MohammedNouh7
OBJECT ORIENTED CONCEPTS,UML DIAGRAMS,DFD
OBJECT ORIENTED CONCEPTS,UML DIAGRAMS,DFDOBJECT ORIENTED CONCEPTS,UML DIAGRAMS,DFD
OBJECT ORIENTED CONCEPTS,UML DIAGRAMS,DFD
smithaps4
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
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
viju001
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
Praseela R
Object_Oriented_Design_Class and Object Diagrams.pptx
Object_Oriented_Design_Class and Object Diagrams.pptxObject_Oriented_Design_Class and Object Diagrams.pptx
Object_Oriented_Design_Class and Object Diagrams.pptx
MNATARAJASURESH
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
surana college
Unified Modeling Language and Examples .pptx
Unified Modeling Language and Examples .pptxUnified Modeling Language and Examples .pptx
Unified Modeling Language and Examples .pptx
abinaya707644
Different Types Diagrams
Different Types Diagrams  Different Types Diagrams
Different Types Diagrams
ShauryaGupta38

Recently uploaded (20)

LA2-64 -bit assemby language program to count number of positive and negative...
LA2-64 -bit assemby language program to count number of positive and negative...LA2-64 -bit assemby language program to count number of positive and negative...
LA2-64 -bit assemby language program to count number of positive and negative...
VidyaAshokNemade
Kamal 2, new features and practical examples
Kamal 2, new features and practical examplesKamal 2, new features and practical examples
Kamal 2, new features and practical examples
Igor Aleksandrov
Project Manager | Integrated Design Expert
Project Manager | Integrated Design ExpertProject Manager | Integrated Design Expert
Project Manager | Integrated Design Expert
BARBARA BIANCO
Artificial intelligence and Machine learning in remote sensing and GIS
Artificial intelligence  and Machine learning in remote sensing and GISArtificial intelligence  and Machine learning in remote sensing and GIS
Artificial intelligence and Machine learning in remote sensing and GIS
amirthamm2083
Cloudera Partner Network Enablement Full.pdf
Cloudera Partner Network Enablement Full.pdfCloudera Partner Network Enablement Full.pdf
Cloudera Partner Network Enablement Full.pdf
Nguy畛n H畉i
Software security: Security a Software Issue
Software security: Security a Software IssueSoftware security: Security a Software Issue
Software security: Security a Software Issue
Dr Sarika Jadhav
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Priyanka Dange
GDGoC Artificial Intelligence Workshop.pptx
GDGoC Artificial Intelligence Workshop.pptxGDGoC Artificial Intelligence Workshop.pptx
GDGoC Artificial Intelligence Workshop.pptx
Aditi330605
Production Planning & Control and Inventory Management.pptx
Production Planning & Control and Inventory Management.pptxProduction Planning & Control and Inventory Management.pptx
Production Planning & Control and Inventory Management.pptx
VirajPasare
Distributed renewable energy in Colombia.OECD2023.pdf
Distributed renewable energy in Colombia.OECD2023.pdfDistributed renewable energy in Colombia.OECD2023.pdf
Distributed renewable energy in Colombia.OECD2023.pdf
SantiagoCardonaGallo
NFPA 70B & 70E Changes and Additions Webinar Presented By Fluke
NFPA 70B & 70E Changes and Additions Webinar Presented By FlukeNFPA 70B & 70E Changes and Additions Webinar Presented By Fluke
NFPA 70B & 70E Changes and Additions Webinar Presented By Fluke
Transcat
Industry 4.0: Transforming Modern Manufacturing and Beyond
Industry 4.0: Transforming Modern Manufacturing and BeyondIndustry 4.0: Transforming Modern Manufacturing and Beyond
Industry 4.0: Transforming Modern Manufacturing and Beyond
GtxDriver
Why the Engineering Model is Key to Successful Projects
Why the Engineering Model is Key to Successful ProjectsWhy the Engineering Model is Key to Successful Projects
Why the Engineering Model is Key to Successful Projects
Maadhu Creatives-Model Making Company
"Introduction to VLSI Design: Concepts and Applications"
"Introduction to VLSI Design: Concepts and Applications""Introduction to VLSI Design: Concepts and Applications"
"Introduction to VLSI Design: Concepts and Applications"
GtxDriver
UHV UNIT-3 HARMONY IN THE FAMILY AND SOCIETY.pptx
UHV UNIT-3 HARMONY IN THE FAMILY AND SOCIETY.pptxUHV UNIT-3 HARMONY IN THE FAMILY AND SOCIETY.pptx
UHV UNIT-3 HARMONY IN THE FAMILY AND SOCIETY.pptx
ariomthermal2031
Analysis of Daylighting in Interior Spaces using the Daylight Factor - A Manu...
Analysis of Daylighting in Interior Spaces using the Daylight Factor - A Manu...Analysis of Daylighting in Interior Spaces using the Daylight Factor - A Manu...
Analysis of Daylighting in Interior Spaces using the Daylight Factor - A Manu...
Ignacio J. J. Palma Carazo
UHV Unit - 4 HARMONY IN THE NATURE AND EXISTENCE.pptx
UHV Unit - 4 HARMONY IN THE NATURE AND EXISTENCE.pptxUHV Unit - 4 HARMONY IN THE NATURE AND EXISTENCE.pptx
UHV Unit - 4 HARMONY IN THE NATURE AND EXISTENCE.pptx
ariomthermal2031
Introduction to Forensic Research Digital Forensics
Introduction to Forensic Research Digital ForensicsIntroduction to Forensic Research Digital Forensics
Introduction to Forensic Research Digital Forensics
SaanviMisar
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANEAirport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Priyanka Dange
Privilege Escalation Techniques and methodology.pdf
Privilege Escalation Techniques and methodology.pdfPrivilege Escalation Techniques and methodology.pdf
Privilege Escalation Techniques and methodology.pdf
harshvikramshahi2
LA2-64 -bit assemby language program to count number of positive and negative...
LA2-64 -bit assemby language program to count number of positive and negative...LA2-64 -bit assemby language program to count number of positive and negative...
LA2-64 -bit assemby language program to count number of positive and negative...
VidyaAshokNemade
Kamal 2, new features and practical examples
Kamal 2, new features and practical examplesKamal 2, new features and practical examples
Kamal 2, new features and practical examples
Igor Aleksandrov
Project Manager | Integrated Design Expert
Project Manager | Integrated Design ExpertProject Manager | Integrated Design Expert
Project Manager | Integrated Design Expert
BARBARA BIANCO
Artificial intelligence and Machine learning in remote sensing and GIS
Artificial intelligence  and Machine learning in remote sensing and GISArtificial intelligence  and Machine learning in remote sensing and GIS
Artificial intelligence and Machine learning in remote sensing and GIS
amirthamm2083
Cloudera Partner Network Enablement Full.pdf
Cloudera Partner Network Enablement Full.pdfCloudera Partner Network Enablement Full.pdf
Cloudera Partner Network Enablement Full.pdf
Nguy畛n H畉i
Software security: Security a Software Issue
Software security: Security a Software IssueSoftware security: Security a Software Issue
Software security: Security a Software Issue
Dr Sarika Jadhav
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Intro of Airport Engg..pptx-Definition of airport engineering and airport pla...
Priyanka Dange
GDGoC Artificial Intelligence Workshop.pptx
GDGoC Artificial Intelligence Workshop.pptxGDGoC Artificial Intelligence Workshop.pptx
GDGoC Artificial Intelligence Workshop.pptx
Aditi330605
Production Planning & Control and Inventory Management.pptx
Production Planning & Control and Inventory Management.pptxProduction Planning & Control and Inventory Management.pptx
Production Planning & Control and Inventory Management.pptx
VirajPasare
Distributed renewable energy in Colombia.OECD2023.pdf
Distributed renewable energy in Colombia.OECD2023.pdfDistributed renewable energy in Colombia.OECD2023.pdf
Distributed renewable energy in Colombia.OECD2023.pdf
SantiagoCardonaGallo
NFPA 70B & 70E Changes and Additions Webinar Presented By Fluke
NFPA 70B & 70E Changes and Additions Webinar Presented By FlukeNFPA 70B & 70E Changes and Additions Webinar Presented By Fluke
NFPA 70B & 70E Changes and Additions Webinar Presented By Fluke
Transcat
Industry 4.0: Transforming Modern Manufacturing and Beyond
Industry 4.0: Transforming Modern Manufacturing and BeyondIndustry 4.0: Transforming Modern Manufacturing and Beyond
Industry 4.0: Transforming Modern Manufacturing and Beyond
GtxDriver
"Introduction to VLSI Design: Concepts and Applications"
"Introduction to VLSI Design: Concepts and Applications""Introduction to VLSI Design: Concepts and Applications"
"Introduction to VLSI Design: Concepts and Applications"
GtxDriver
UHV UNIT-3 HARMONY IN THE FAMILY AND SOCIETY.pptx
UHV UNIT-3 HARMONY IN THE FAMILY AND SOCIETY.pptxUHV UNIT-3 HARMONY IN THE FAMILY AND SOCIETY.pptx
UHV UNIT-3 HARMONY IN THE FAMILY AND SOCIETY.pptx
ariomthermal2031
Analysis of Daylighting in Interior Spaces using the Daylight Factor - A Manu...
Analysis of Daylighting in Interior Spaces using the Daylight Factor - A Manu...Analysis of Daylighting in Interior Spaces using the Daylight Factor - A Manu...
Analysis of Daylighting in Interior Spaces using the Daylight Factor - A Manu...
Ignacio J. J. Palma Carazo
UHV Unit - 4 HARMONY IN THE NATURE AND EXISTENCE.pptx
UHV Unit - 4 HARMONY IN THE NATURE AND EXISTENCE.pptxUHV Unit - 4 HARMONY IN THE NATURE AND EXISTENCE.pptx
UHV Unit - 4 HARMONY IN THE NATURE AND EXISTENCE.pptx
ariomthermal2031
Introduction to Forensic Research Digital Forensics
Introduction to Forensic Research Digital ForensicsIntroduction to Forensic Research Digital Forensics
Introduction to Forensic Research Digital Forensics
SaanviMisar
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANEAirport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Airport Components Part1 ppt.pptx-Site layout,RUNWAY,TAXIWAY,TAXILANE
Priyanka Dange
Privilege Escalation Techniques and methodology.pdf
Privilege Escalation Techniques and methodology.pdfPrivilege Escalation Techniques and methodology.pdf
Privilege Escalation Techniques and methodology.pdf
harshvikramshahi2

OOP_Module 2.pptx

  • 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 wholepart 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
  • 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 classs 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()