logo

Object Oriented Programming: Inheritance, Encapsulation, Polymorphism

11 Pages1451 Words340 Views
   

Added on  2023-06-07

About This Document

This article explains Object Oriented Programming and its features like Inheritance, Encapsulation, Polymorphism. It discusses how OOPs makes programming easy and efficient. The article provides examples of inheritance, encapsulation, and polymorphism in Java programming language. It also highlights the importance of data security and flexibility in OOPs. The article concludes by stating that OOPs can be implemented in Java, C++, and other programming languages.

Object Oriented Programming: Inheritance, Encapsulation, Polymorphism

   Added on 2023-06-07

ShareRelated Documents
Running head: OBJECT ORIENTED PROGRAMING
Object Oriented Programing
Name of the Student
Name of the University
Author Note
Object Oriented Programming: Inheritance, Encapsulation, Polymorphism_1
1OBJECT ORIENTED PROGRAMING
Table of Contents
Introduction....................................................................................................................3
Object Oriented Programing..........................................................................................3
Encapsulation:................................................................................................................5
Polymorphism................................................................................................................7
Conclusion....................................................................................................................10
Object Oriented Programming: Inheritance, Encapsulation, Polymorphism_2
2OBJECT ORIENTED PROGRAMING
Introduction:
The OOPs or the object oriented programing can be explained as the programing
model language that is organised around the actions and the data rather than the logical
programing. This make the OOPs one of the best and most efficient programing language
(Zakas 2015). The concept of the OOPs have made programing much simple and very much
efficient in terms of coding. Some of the most important features of OOPs programing are –
inheritance, abstraction, and polymorphism. These parts will be further described in the
paper.
Object Oriented Programing
Inheritance Programing- The concept of the inheritance is one of the most important feature
of the object oriented programing. The inheritance property defines that the child class can
inherit the properties of the parent class. This is one of the most interesting feature of the
OOPs concept that helps in the property of the inheriting data from the different classes.
Inheritance can be sub divided into 5 different sections. Namely the single inheritance,
multiple inheritance, multiple inheritance, hierarchical inheritance, Hybrid inheritance
(Bracha and Ungar 2015). The single inheritance is when a single class inherits the
properties of the single parent class. The multiple inheritance can be explained as when a
child class inherits the properties of the 2 or more parent classes. The multilevel inheritance
provides the concept of the class which is extracted from another class and further that class
being derived from another class. That is class c derived from class B and the Class B is
derived from class A. IN hierarchical inheritance two child class are derived from a single
parent class.
Object Oriented Programming: Inheritance, Encapsulation, Polymorphism_3
3OBJECT ORIENTED PROGRAMING
Further an example of the inheritance program code is presented the paper with the
results.
(Figure 1: inheritance)
(Source: Author)
class Teacher1 {
String designation = "Teacher1";
String college = "Beginners";
void does(){
System.out.println("Teaching");
}
Object Oriented Programming: Inheritance, Encapsulation, Polymorphism_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
OO Basics and Smalltalk: A Beginner's Guide to Object Oriented Programming
|5
|702
|168

Concept of Data Encapsulation
|10
|2878
|302

Object Oriented Programming Concepts - Assignment
|31
|1680
|187

Class And objectives in Java Laguage
|13
|1461
|20

Assignment on Explaining Polymorphism
|11
|1647
|313

Object Oriented Design for Genetic Algorithm Solver
|8
|1573
|93