Please enable JavaScript.
Coggle requires JavaScript to display documents.
Java Object Oriented Concept and Terminologies - Coggle Diagram
Java Object Oriented Concept and Terminologies
Class and Object
Object
:check: Instance of a class
:<3: Declaration : A variable declaration with an object type
:<3: Instantiation : New keyword is used to create the object
:<3: Access Method : Using (.) dot operator
Class
:check: Template or Blueprint to create an object
:red_flag: Access Modifier : public private. protected
:red_flag: Constructor : Default or Parameterize
Pillar of OOP
Encapsulation
:check: This is called data hiding.
:red_flag:To apply encapsulation in Java:
Step 1:
Declare the variables of a class as a private
Step 2:
Provide public setter and getter methods to modify and view the variables values.
Abstraction
:check: System of object that interact each other
:red_flag: Provide advantage of codes reuse
:red_flag: Breaking the object into more manageable pieces
:red_flag: Use the functionality of class without knowing the implementation
Polymorphism
:check: Means many form
:red_flag:
Overriding:
If the subclass would like to change the functionality of superclass method
:red_flag:
Overloading:
Use it when you actually do need multiple methods with different parameters, but the methods do the same thing (same name of methods).
Inheritance
:check: One class derives the properties of another class
:red_flag: Sub class inherited Super class using extends keyword
:red_flag: Sub class can call Super class constructor using super keyword
Interface
:check: Extending more than one class
:red_flag: class implements interface
UML Class Diagram
:check: Provide comprehensive notation notation by showing the classes of the system, its attributes , operations (or methods) and the relationships between objects.