In the Last Tutorial we discussed the concept of Inheritance. Today we are gonna touch another important concept called Encapsulation. I will start of by introducing the formal definition of Encapsulation as found here. Encapsulation is a way by which data and functions are combined into one structure or entity and treated as one. In older approaches of programming data and functions were kept independent of each other. This created problems for the programmers. As the size of the program grew so did its complexity. By combining the two into one entity programmers's job simplified :-
Showing posts with label object oriented programming. Show all posts
Showing posts with label object oriented programming. Show all posts
Java Tutorial 2: Introduction to object oriented programming Inheritance
In our previous tutorial i.e. A programmer's Diary: Java Tutorial 1: Introduction to object oriented programming we touched the concept of objects and classes. In this tutorial we will try and grab the concept of inheritance. Ok so we established that classes are blueprints. But sometimes 1 blueprints is built on the foundation of the other blueprint. In this case we say that blueprint number 2 is derived from blueprint number 1. It has same features has blueprint number one and plus its own features.
Filed under:
java,
object oriented programming,
oops,
tutorial
Java Tutorial 1: Introduction to object oriented programming
Hi My name is Jasleen and I am gonna explain to you what exactly is object oriented programming in the most layman language possible. So what exactly is OBJECT ORIENTED PROGRAMMING? Sounds daunting right? But once you understand it you will realize it is NOT. You will discover its potential and it will change your perception towards how you see programming.
In object oriented programming we have only one job- Design Objects and put them into code. You must be thinking this girl is nuts and doesn't know anything. I am wasting my time. Trust me you are not.
In object oriented programming we have only one job- Design Objects and put them into code. You must be thinking this girl is nuts and doesn't know anything. I am wasting my time. Trust me you are not.
Subscribe to:
Posts (Atom)