LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs > TheIndependentAquarius
User Name
Password

Notices

Rate this Entry

Object oriented programming - Objects and Classes [C++]

Posted 11-15-2011 at 03:02 AM by TheIndependentAquarius
Updated 06-12-2013 at 12:31 PM by TheIndependentAquarius

Object oriented programming is all about representing the parts of
the problem statements as `objects` and having them interact with
each other (by calling function(s) of the object in question).

Every object has a type. The type of an object is often called a
`class` in object oriented programming. The class contains the list
of characteristics of the object and the functions which the object
is capable of performing.
We can have many objects of a particular class. All the objects of
a particular class are bound to have identical characteristics and
functionalities.

The classes we define to represent our problem elements are similar
to the built in data types like float, int etc. A floating point number,
for example, also has a set of characteristics and behaviors.
The difference is that a programmer defines a new class to fit a new
problem rather than being forced to use an existing data type that
was designed to represent a storage unit.


Reference:
Thinking in C++ (Vol 1) - Bruce Eckel
Posted in C++, The basics
Views 1338 Comments 1
« Prev     Main     Next »
Total Comments 1

Comments

  1. Old Comment
    Updated the blog with some sensible (IMO) information.
    Posted 11-29-2012 at 03:15 AM by TheIndependentAquarius TheIndependentAquarius is offline
 

  



All times are GMT -5. The time now is 01:29 AM.

Main Menu

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration