oop principles
Abstraction (Partial Abstraction & Interfaces)
Encapsulation (Private Field & Getter & Setter)
Inheritance (Super and Sub Class)
Polymorphism (Static - Overloading & Dynanmic - Overriding)
oop principles
Abstraction (Partial Abstraction & Interfaces)
Encapsulation (Private Field & Getter & Setter)
Inheritance (Super and Sub Class)
Polymorphism (Static - Overloading & Dynanmic - Overriding)
principles of object oriented programming
Below mentioned respectively Pillers of OOP concept
and Principles of OOP Design (SOLID)
Pillers of OOP concept
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
Principles of OOP Design
1. Single Responsibility Principle (SRP)
2. Open-Closed Principle (OCP)
3. Liskov Substitution Principle (LSP)
4. Interface Segregation Principle (ISP)
5. Dependency Inversion Principle (DIP)
principles of object oriented programming
public class Main {
public static void main(String[] args) {
/*
Creating objects
*/
Cat thor = new Cat();
Cat rambo = new Cat();
/*
Defining Thor cat
*/
thor.name = "Thor";
thor.age = 3;
thor.breed = "Russian Blue";
thor.color = "Brown";
thor.sleep();
/*
Defining Rambo cat
*/
rambo.name = "Rambo";
rambo.age = 4;
rambo.breed = "Maine Coon";
rambo.color = "Brown";
rambo.play();
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us