SlideShare a Scribd company logo
1 of 11
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

What's hot

Classes and Nested Classes in Java
Classes and Nested Classes in JavaClasses and Nested Classes in Java
Classes and Nested Classes in JavaRavi_Kant_Sahu
 
object oriented programming using c++
 object oriented programming using c++ object oriented programming using c++
object oriented programming using c++fasalsial1fasalsial1
 
Inner Classes & Multi Threading in JAVA
Inner Classes & Multi Threading in JAVAInner Classes & Multi Threading in JAVA
Inner Classes & Multi Threading in JAVATech_MX
 
Chapter18 class-and-objects
Chapter18 class-and-objectsChapter18 class-and-objects
Chapter18 class-and-objectsDeepak Singh
 
2 lesson 2 object oriented programming in c++
2 lesson 2 object oriented programming in c++2 lesson 2 object oriented programming in c++
2 lesson 2 object oriented programming in c++Jeff TUYISHIME
 
Class and object in c++
Class and object in c++Class and object in c++
Class and object in c++NainaKhan28
 
Lect 1-class and object
Lect 1-class and objectLect 1-class and object
Lect 1-class and objectFajar Baskoro
 
Chapter 6.4
Chapter 6.4Chapter 6.4
Chapter 6.4sotlsoc
 
Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsMaryo Manjaruni
 
Classes and objects till 16 aug
Classes and objects till 16 augClasses and objects till 16 aug
Classes and objects till 16 augshashank12march
 
Classes, objects, methods, constructors, this keyword in java
Classes, objects, methods, constructors, this keyword  in javaClasses, objects, methods, constructors, this keyword  in java
Classes, objects, methods, constructors, this keyword in javaTharuniDiddekunta
 
Class diagram
Class diagramClass diagram
Class diagramSESP123
 

What's hot (20)

Classes and Nested Classes in Java
Classes and Nested Classes in JavaClasses and Nested Classes in Java
Classes and Nested Classes in Java
 
[OOP - Lec 07] Access Specifiers
[OOP - Lec 07] Access Specifiers[OOP - Lec 07] Access Specifiers
[OOP - Lec 07] Access Specifiers
 
object oriented programming using c++
 object oriented programming using c++ object oriented programming using c++
object oriented programming using c++
 
Write First C++ class
Write First C++ classWrite First C++ class
Write First C++ class
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
 
Inner Classes & Multi Threading in JAVA
Inner Classes & Multi Threading in JAVAInner Classes & Multi Threading in JAVA
Inner Classes & Multi Threading in JAVA
 
ICOM4015 CIIC4010 Exam Review #1
ICOM4015 CIIC4010 Exam Review #1 ICOM4015 CIIC4010 Exam Review #1
ICOM4015 CIIC4010 Exam Review #1
 
Chapter18 class-and-objects
Chapter18 class-and-objectsChapter18 class-and-objects
Chapter18 class-and-objects
 
2 lesson 2 object oriented programming in c++
2 lesson 2 object oriented programming in c++2 lesson 2 object oriented programming in c++
2 lesson 2 object oriented programming in c++
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
Class and object in c++
Class and object in c++Class and object in c++
Class and object in c++
 
class diagram
class diagramclass diagram
class diagram
 
Lect 1-class and object
Lect 1-class and objectLect 1-class and object
Lect 1-class and object
 
Chapter 6.4
Chapter 6.4Chapter 6.4
Chapter 6.4
 
Inheritance used in java
Inheritance used in javaInheritance used in java
Inheritance used in java
 
Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented concepts
 
Classes and objects till 16 aug
Classes and objects till 16 augClasses and objects till 16 aug
Classes and objects till 16 aug
 
Classes, objects, methods, constructors, this keyword in java
Classes, objects, methods, constructors, this keyword  in javaClasses, objects, methods, constructors, this keyword  in java
Classes, objects, methods, constructors, this keyword in java
 
Class diagram
Class diagramClass diagram
Class diagram
 
Class Diagram
Class DiagramClass Diagram
Class Diagram
 

Similar to Class diagram java

classandobjectunit2-150824133722-lva1-app6891.ppt
classandobjectunit2-150824133722-lva1-app6891.pptclassandobjectunit2-150824133722-lva1-app6891.ppt
classandobjectunit2-150824133722-lva1-app6891.pptmanomkpsg
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .NetGreg Sohl
 
Activity sequence -class and swimlane
Activity  sequence -class  and swimlaneActivity  sequence -class  and swimlane
Activity sequence -class and swimlaneHassnat Ahmed
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxanguraju1
 
chapter 5 Objectdesign.ppt
chapter 5 Objectdesign.pptchapter 5 Objectdesign.ppt
chapter 5 Objectdesign.pptTemesgenAzezew
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindiappsdevelopment
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAravinth NSP
 
chapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdfchapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdfstudy material
 
Using class and object java
Using class and object javaUsing class and object java
Using class and object javamha4
 
11 Using classes and objects
11 Using classes and objects11 Using classes and objects
11 Using classes and objectsmaznabili
 
oops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdfoops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdfArpitaJana28
 
L ab # 07
L ab # 07L ab # 07
L ab # 07Mr SMAK
 
Reflection in java
Reflection in javaReflection in java
Reflection in javaupen.rockin
 
oop lecture 3
oop lecture 3oop lecture 3
oop lecture 3Atif Khan
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IIpkaviya
 

Similar to Class diagram java (20)

Oops
OopsOops
Oops
 
classandobjectunit2-150824133722-lva1-app6891.ppt
classandobjectunit2-150824133722-lva1-app6891.pptclassandobjectunit2-150824133722-lva1-app6891.ppt
classandobjectunit2-150824133722-lva1-app6891.ppt
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 
Activity sequence -class and swimlane
Activity  sequence -class  and swimlaneActivity  sequence -class  and swimlane
Activity sequence -class and swimlane
 
My c++
My c++My c++
My c++
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptx
 
chapter 5 Objectdesign.ppt
chapter 5 Objectdesign.pptchapter 5 Objectdesign.ppt
chapter 5 Objectdesign.ppt
 
Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1Synapseindia strcture of dotnet development part 1
Synapseindia strcture of dotnet development part 1
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Oops
OopsOops
Oops
 
chapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdfchapter-7-classes-and-objects.pdf
chapter-7-classes-and-objects.pdf
 
Using class and object java
Using class and object javaUsing class and object java
Using class and object java
 
11 Using classes and objects
11 Using classes and objects11 Using classes and objects
11 Using classes and objects
 
Class and object
Class and objectClass and object
Class and object
 
oops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdfoops-123991513147-phpapp02.pdf
oops-123991513147-phpapp02.pdf
 
L ab # 07
L ab # 07L ab # 07
L ab # 07
 
Reflection in java
Reflection in javaReflection in java
Reflection in java
 
oop lecture 3
oop lecture 3oop lecture 3
oop lecture 3
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT II
 

Recently uploaded

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
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
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
(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
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Recently uploaded (20)

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
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
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(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
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 

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

  1. 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.
  2. 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
  3. 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)
  4. 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
  5. Class representation Compartmentalized rectangles Top compartment: name of class Middle compartment: structure of the class (attributes) Bottom compartment: behavior of the class (operations)
  6. -cassetteID: int -cassetteVolumeNo: int