SlideShare a Scribd company logo
Prepared by-Ravin Laheri (160120107054)
Guided by –Prof . Chintan Shah
Gandhinagar Institute of Technology
Subject Code(2150704)
Explain class diagram.
What is a Class?
 A general template that we use to create
specific instances or objects in the application
domain
 Represents a kind of person, place, or thing
about which the system will need to capture
and store information
 Abstractions that specify the attributes and
behaviors of a set of objects
Explain class diagram.2
What is an Object?
 Entities that encapsulate state and behavior
 Each object has an identity
 It can be referred individually
 It is distinguishable from other objects
Explain class diagram.3
Types of Classes
Ones found during analysis:
people, places, events, and things about which the
system will capture information
ones found in application domain
Ones found during design
specific objects like windows and forms that are
used to build the system
Explain class diagram.4
Two Kinds of Classes during Analysis
 Concrete
 Class from application domain
 Example: Customer class and Employee
class
 Abstract
 Useful abstractions
 Example: Person class
Explain class diagram.5
Attributes in a Class
Properties of the class about which we want to
capture information
Represents a piece of information that is
relevant to the description of the class within
the application domain
Explain class diagram.6
Attributes in a Class
Only add attributes that are primitive or atomic
types
Derived attribute
attributes that are calculated or derived from other
attributes
denoted by placing slash (/) before name
Explain class diagram.7
Operations in a Class
Represents the actions or functions that a class
can perform
Describes the actions to which the instances of
the class will be capable of responding
Can be classified as a constructor, query, or
update operation
Explain class diagram.8
UML Representation of Class
Class Name
Attributes of Class
Operations/methods
of Class
Explain class diagram.9
Example of a Class Diagram
Video Rental System
methods
class name
Video
+rentMovie()
Customer
-CID: int
-name: String
+authenticateCustomer ()
relationship
rents
1..*1..*
multiplicityvisibility
attributes
-cassetteID : int
-cassetteVolumeNo: int
Explain class diagram.10
THANK YOU
Explain class diagram.11

More Related Content

PPTX
C# Types of classes
PPTX
Object oriented architecture in erp
PPTX
Classes and Objects in C#
PPTX
C# classes objects
PDF
Classes and objects in java
PPTX
class c++
PPTX
Classes and objects
PPT
Classes cpp intro thomson bayan college
C# Types of classes
Object oriented architecture in erp
Classes and Objects in C#
C# classes objects
Classes and objects in java
class c++
Classes and objects
Classes cpp intro thomson bayan college

What's hot (20)

PDF
Classes and Nested Classes in Java
PPTX
[OOP - Lec 07] Access Specifiers
PPTX
object oriented programming using c++
PPTX
Write First C++ class
PPTX
Constructor in java
PPTX
Inner Classes & Multi Threading in JAVA
PPTX
ICOM4015 CIIC4010 Exam Review #1
PDF
Chapter18 class-and-objects
PPT
2 lesson 2 object oriented programming in c++
PPTX
Classes and objects
PPT
Class and object in c++
PPTX
class diagram
PPT
Lect 1-class and object
PPTX
Chapter 6.4
PDF
Inheritance used in java
PPT
Jedi slides 2.1 object-oriented concepts
PPTX
Classes and objects till 16 aug
PDF
Classes, objects, methods, constructors, this keyword in java
PPTX
Class diagram
PPTX
Class Diagram
Classes and Nested Classes in Java
[OOP - Lec 07] Access Specifiers
object oriented programming using c++
Write First C++ class
Constructor in java
Inner Classes & Multi Threading in JAVA
ICOM4015 CIIC4010 Exam Review #1
Chapter18 class-and-objects
2 lesson 2 object oriented programming in c++
Classes and objects
Class and object in c++
class diagram
Lect 1-class and object
Chapter 6.4
Inheritance used in java
Jedi slides 2.1 object-oriented concepts
Classes and objects till 16 aug
Classes, objects, methods, constructors, this keyword in java
Class diagram
Class Diagram
Ad

Similar to Class diagram java (20)

PPTX
Class Diagrams
PPTX
Unit 1- OOAD ppt
PDF
ADSI-Pemodelan Kebutuhan 000000000000000000000000000.pdf
PPTX
Unified Modeling Language and Examples .pptx
DOCX
Chapterunifiedmo 3 UML Class Diagram.docx
PPT
uml123 copy
PPT
Chapter 2-Unified Modeling Languagee.ppt
PPT
Chapter 2-Unified Modeling Languagee.ppt
PPTX
introofUML.pptx
PDF
Software Testing and UML Lab
PDF
Ooad( class diagram)
PPT
class diagrams and their relationships
PPTX
Slideshow on the notes of software engineering
PPTX
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
PPTX
PDF
CS8592-OOAD Lecture Notes Unit-2
PPTX
SMD Unit ii
PPT
Week 10-classdiagrams.pptdddddddddddddddddddddddddddd
PDF
Lecture 4-oop class diagram
Class Diagrams
Unit 1- OOAD ppt
ADSI-Pemodelan Kebutuhan 000000000000000000000000000.pdf
Unified Modeling Language and Examples .pptx
Chapterunifiedmo 3 UML Class Diagram.docx
uml123 copy
Chapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.ppt
introofUML.pptx
Software Testing and UML Lab
Ooad( class diagram)
class diagrams and their relationships
Slideshow on the notes of software engineering
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD Lecture Notes Unit-2
SMD Unit ii
Week 10-classdiagrams.pptdddddddddddddddddddddddddddd
Lecture 4-oop class diagram
Ad

Recently uploaded (20)

PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
Geodesy 1.pptx...............................................
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
DOCX
573137875-Attendance-Management-System-original
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Sustainable Sites - Green Building Construction
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPT
Project quality management in manufacturing
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Safety Seminar civil to be ensured for safe working.
Geodesy 1.pptx...............................................
Model Code of Practice - Construction Work - 21102022 .pdf
573137875-Attendance-Management-System-original
CH1 Production IntroductoryConcepts.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Foundation to blockchain - A guide to Blockchain Tech
Sustainable Sites - Green Building Construction
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Lecture Notes Electrical Wiring System Components
bas. eng. economics group 4 presentation 1.pptx
Project quality management in manufacturing
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Embodied AI: Ushering in the Next Era of Intelligent Systems
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx

Class diagram java

  • 1. Prepared by-Ravin Laheri (160120107054) Guided by –Prof . Chintan Shah Gandhinagar Institute of Technology Subject Code(2150704) Explain class diagram.
  • 2. What is a Class?  A general template that we use to create specific instances or objects in the application domain  Represents a kind of person, place, or thing about which the system will need to capture and store information  Abstractions that specify the attributes and behaviors of a set of objects Explain class diagram.2
  • 3. What is an Object?  Entities that encapsulate state and behavior  Each object has an identity  It can be referred individually  It is distinguishable from other objects Explain class diagram.3
  • 4. Types of Classes Ones found during analysis: people, places, events, and things about which the system will capture information ones found in application domain Ones found during design specific objects like windows and forms that are used to build the system Explain class diagram.4
  • 5. Two Kinds of Classes during Analysis  Concrete  Class from application domain  Example: Customer class and Employee class  Abstract  Useful abstractions  Example: Person class Explain class diagram.5
  • 6. Attributes in a Class Properties of the class about which we want to capture information Represents a piece of information that is relevant to the description of the class within the application domain Explain class diagram.6
  • 7. Attributes in a Class Only add attributes that are primitive or atomic types Derived attribute attributes that are calculated or derived from other attributes denoted by placing slash (/) before name Explain class diagram.7
  • 8. Operations in a Class Represents the actions or functions that a class can perform Describes the actions to which the instances of the class will be capable of responding Can be classified as a constructor, query, or update operation Explain class diagram.8
  • 9. UML Representation of Class Class Name Attributes of Class Operations/methods of Class Explain class diagram.9
  • 10. Example of a Class Diagram Video Rental System methods class name Video +rentMovie() Customer -CID: int -name: String +authenticateCustomer () relationship rents 1..*1..* multiplicityvisibility attributes -cassetteID : int -cassetteVolumeNo: int Explain class diagram.10

Editor's Notes

  • #6: Concrete Used to create objects Abstract Person class is really a generalization from Customer class and Employee class Attributes and methods common to both Customer class and Employee class Examples of common attributes: name, address, birthdate, phone number, email address Generally do not create objects from Person class but rather create and use employee and customer objects Later in the design and implementation phases, we will also identify other classes such as user interface classes, data structure classes, document classes, file structure classes, operating environment classes, and various types of multimedia classes.
  • #7: Attributes in a Class Contains information that the analyst or user feels that the system should store Represents properties that describe the state of the object Only attributes important to the task should be included in the class For example, for employee, employee name is a good attribute; employee hair color is not (not relevant in the business application) Primitive or atomic types Such as integer, string, double, date, time, boolean, … Generally complex or compound attributes are really placeholders for relationships between classes
  • #8: Attributes in a class diagram Typed in middle compartment Derived attributes Examples: age (subtracting birthdate from current date), GPA (calculated from grades and credit hours)
  • #9: Operations in a Class Represents the actions or functions that a class can perform In later phases, the operations are converted to methods (functions in C++) Only problem domain-specific operations that are relevant to the problem should be considered Classes normally are required to provide the means to create instances, delete instances, access individual attribute values, set individual attribute values, and other basic types of operations At this point in development, don’t clutter up the definition of the class with these basic types of operations Focus only on relevant problem domain-specific operations 1)Constructor operation Creates a new instance of a class Since creation is normally available to all classes, typically will not see constructor methods at this point in the development of the class diagram 2)Query operation Makes information about the state of an object available to other objects but will not alter the object in any way 3)Update operation Changes the value of some or all of the object’s attributes which may result in a change in the object’s state
  • #10: Class representation Compartmentalized rectangles Top compartment: name of class Middle compartment: structure of the class (attributes) Bottom compartment: behavior of the class (operations)
  • #11: -cassetteID: int -cassetteVolumeNo: int