There are many programming model exists today such as Procedural Programming, Structural Programming,Event Driven Programming, Object Oriented Programming, Functional Programming and many more. In this tutorial, we will be focus on just two programming models.
Overview of Object Oriented Programming
In this model, there is a concept of Object which consists of set of data and operations on it.
The object is basically the blue print of any real thing such as aeroplane, car,chair, table, any living person and so on. Or object can be represents any conceptual term such as Company, Bank, Account,Customer and so on.
Each object will have attributes called data associated to it. And we can manipulate the data in the object using the method/operations defined in the it. This concept is called Data encapsulation.
Also, the object can inherit attributes and operations from other object. This terminology is called inheritance. For eg. Horse is a ‘kind of’ Animal. Therefore, it can inherit the data and operations from Animal.
Many programming language support object oriented model such as Java, C++, PHP,Python, Scala and many more.
Lets take a example of the Scala code wherein we will demonstrate a class called Account and inherited class Saving Account.
Read More…