OOP Concept OOP is a programming style which concept use to map the real world scenario by using some primary concepts such as abstraction, encapsulation, inheritance, and polymorphism. Most popular programming language like Java , c++ , c# , Ruby etc. Follow an object oriented programming paradigm. Abstraction When create a class which is declared as an abstract, cannot create an object of an abstract class. To use an abstract class, you have to inherit it from another class where you have to provide implementation for the abstract methods there itself , else it will become an abstract class. Let's look at the syntax of an abstract class: Abstract class Mobile { // abstract class mobile Abstract void run(); // abstract method Encapsulation It uses for data hiding and data encapsulation is a mechanism of bundling the data. Declare the variables of a class as a private. When provides the public get...
Posts
Showing posts from April 22, 2018