Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what are the characteristics of oops?

Answer Posted / rakesh satpute

Characteristics of Object Oriented Languages
Objects:

Objects are the basic run-time entities in an object
oriented system.They may represent a person,a place or any
item that the program has to handle.
They may also represent user defined data such as
vectors,time and lists.
An object is an instance of a class.

Declaring Objects:
Creating objects is similar to declaring variables and
can be done using the syntax:-
<Class Name> <Object Name>;

Example:
Student S1;

Class:

We just mentioned that objects contain data, and code to
manipulate that data.
The entire set of data and code of an object can be made
a user-defined data type with the help of a class.
The objects are variables of the type class.
Once a class has been defined, we can create any number
of objects belonging to that class.


Declaring Classes:
We declare classes using the following syntax:-
class < Class Name >
{
data members…
member functions…
}
Here class is a keyword.

Rules for naming classes:
* A class name must begin with a letter & can be
followed by a sequence of letters (A-Z), digits
(0-9)m,underscore (_)
* Special Characters such as ? - + * / \ ! @ # $ % ^ ( )
[ ] { } , ; : . cannot be used in the class name.
* A class name must not be the same as a reserved
keyword such as using, public, etc.

Data Abstraction and Encapsulation:

The wrapping up of data and functions into a single unit
is known as encapsulation.
Data encapsulation is the most striking feature of a class.
Abstraction refers to the act of representing essential
features without including the background details or
explanations.
Encapsulation is the hiding of information in order to
ensure that data structures and operators are used as
intended and to make the usage model more obvious to the
developer.
C++ provides the ability to define classes and functions
as its primary encapsulation mechanisms.



The figure is an example of data abstraction to
abstract doors as a data structure with essential properties.
Inheritance:

Inheritance is the process by which objects of one class
acquire the properties of objects of another class.
It supports the concept of hierarchical classification.
Creating new class is also known as the derived class
The existing class is also called the baseclass.



where Circle and Rectangle inherit from GeomFigure and
own all attributes and methods from GeoFigure.
Reusability:

The concept of inheritence provides an important feature
to the object-oriented lanuage-reusability.
A programmer can take an existing class and, without
modifyinh it, and additional features and capabilities to it.
This is done by deriving a new class from an existing class.


Polymorphism:

Polymorphism is another important OOP concept.
The word polymorphism is derived from two Latin words
poly (many) and morphos(forms).
An operation many exhibit different behaviours in
different instances..
The behaviour depends upon the types of data used in the
operation.


Dynamic Binding:

Binding refers to the linking of a procedure call to the
code to be executed in response to the call.
Dynamic binding means that the code associated with a
given procedure call is not known until the time of the call
at run-time.
It is associated with polymorphism and inheritance.

Message passing:
An object oriented program consists of a set of objects
that communicte with each other.
The process of programming in an object oriented
language,and it involves the following steps

Creating classes that define objects and their behaviour
Creating objects from class definitions ,and
Establishing communication among objects.

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a C++ program for booking using constructor and destructor.

2494


why reinterpret cast is considered dangerous?

2336


Advantage and disadvantage of routing in telecom sector

1248


Why do pointers exist?

1046


What is oops in simple words?

1032


How to hide the base class functionality in Inheritance?

1089


How can you overcome the diamond problem in inheritance?

1138


What is abstract class in oop?

953


Which language is not a true object oriented programming language?

1061


Explain virtual inheritance?

1125


What is the important feature of inheritance?

1069


What is destructor example?

988


Why is abstraction used?

1028


How do you define a class in oop?

1059


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

2079