Sunday, April 16, 2017

OBJECT ORIENTED PROGRAMMING CONCEPTS IN JAVA

Introduction

Objects are real world entities like table, chair, ball etc. This consists of some concepts below which are used to design or solve a situation.

Object

Can be physical or logical and has a state and behaviour.

Class


Collection of Objects

Inheritance


Its when an object utilises all the states or behaviour of a parent object in order to re-use.

Polymorphism


A specific task is performed in different ways Eg: Method overloading and overriding are used to achieve polymorphism in java.

Abstraction


Hiding the internal processing and displaying the UI and its functions

Encapsulation


Joining code and data together into a single unit Eg: Capsule is wrapped with different medicines internally.



No comments:

Post a Comment