Please enable JavaScript.
Coggle requires JavaScript to display documents.
OOP(Object Oriented Programming) (Principles (Inheritance (Hierarchical,…
OOP(Object Oriented Programming)
Principles
Encapsulation
Provides the security
Keeps the data and internal methods
hidden for the outside world.
Inheritance
Hierarchical
Multi-level
Single-level
Multiple
(through interface only)
It is the mechanism in java by which one class is allow to inherit the features(fields and methods) of another class.
Types
Abstraction
System of objects that interact
with each other
Provides advantage of code reuse
Polymorphism
Types:Compile-time
Run-time
Polymorphism is the ability of an object to take on many
Languages
java
c#
Python
Ruby
VisualBasic etc
Object
Declaration − A variable declaration with a
variable name with an object type
Instantiation − The 'new' keyword is used to
create the object
Initialization − The 'new' keyword is
followed by a call to a constructor.It creates Objects.
.(dot) operator access the state and the
behaviourEnums
Class
Class-Members
Access Modifier
Public
Private
Default
Attributes/Fields/Properties
Static
Instance
Local
Constructor
Static
Default-Constructor
parameterized-Constructor
Copy-Constructor
Behaviour (Methods)
Overload Methods
Override Methods
Instance Methods
Static Methods
Interface
Extending more that one class
Has fields - just name and methods - just
bodyComposition
Class implements Interface
Data-Types
Reference-Type
Value-type