Showing posts with label Object Oriented Programming. Show all posts
Showing posts with label Object Oriented Programming. Show all posts

Wednesday, 26 September 2018

Objects

An Object represents an entity within the world like someone, thing or concept etc. An object is identified by its name. An object consists of the subsequent two things:
  • Properties: Properties are the characteristics of an object. 
  • Functions: Functions are the action which will be performed by an object. 

Examples:

Some samples of objects of different variious  are as follows:

  • Physical Objects: 

           Vehicles likes  cars, bus, trucks etc.
           Electrical components
           Elements of Computer-User Environment

  • Windows

          Menus
          Graphics objects
          Mouse and Keyboard

  • User-defined Data Types

          Time
         Angles

Properties of Object: 

The characteristics of an object are called its properties or attributes. Each object has its own properties. These properties are accustomed to describe the object. For instance, the properties of an object. Person can be as follows:

  • Name 
  • Age 
  • Weight 

The properties of an object Car is be as follows:

  • Color 
  • Price 
  • Model 
  • Engine power 

The set of values of the attributes of a selected object is named  its state. It means that the state of an object may be determined by the values of its attributes.
Functions of Object:
An object can perform different tasks and actions.The actions that may  be performed by the an object referred to as functions and methods. For the

Wednesday, 21 December 2016

Object Oriented Programming

Object Oriented Programming (OOP) is a programming technique in which programs are written on the basis of objects. Object Oriented Programming is a powerful technique to develop software. It is used to analyze and design the applications in terms of objects. It deals with data and the procedures that processes the data as a single object. Object Oriented programming is easier to learn and  modify.

Features of Object Oriented Programming 

Following are the features of the object-oriented programming:

Objects: 

Object is an entity that consists of data and functions. OOP provides the facility of programming based on objects.

Classes: 

Classes are design of creating objects. OOP provides the facility to design classes for creating different object. All properties and functions of an object are specified in classes.

Reuasability: 

OOP provides the facility of reusing the data and code. Inheritance is a technique that allows a programmer to use the code of existing program to create a new program.

Polymorphism: 

Polymorphism is an ability of an object to behave in multiple ways.e.g Operator Overloading, Function Overloading.

Real-World Modeling: 

OOP is based on real-world modeling. As in real world, things have properties and working capabilities. Similarly, objects have data and functions. Data represents properties and functions represents working of objects.

Information Hiding: 

OOP allows the programmer to hide important data from the user. It is performed by  encapsulation.

Dynamic Binding: 

Refers to linking of function call with function definition is called binding and when it is  take place at run time called dynamic binding.

Message Passing: 

The process by which one object can interact with other object is called message passing.


Methods in JAVA Language

 In general, a way may be thanks to perform some task. Similarly, the tactic in Java may be a collection of instructions that performs a sel...