- Variables (data members)
- Functions (member functions)
In C++,
classes are first declared and are normally put in a separate header file. Then
the member functions for each class are defined. Finally, the user code is
written to create instances of classes (objects) and to perform the required
tasks. A class’s attributes and behaviors are implemented using data members
(instance variables) and member functions, respectively.
Information
hiding is implemented by declaring members (data or functions) with one of the
three categories of accessibility: private, public, and protected. Any function
(member or nonmember) can access a public member. Only member functions of the
class can access a private member. When members are protected, they can be
accessed by member functions of the base class and its derived classes but not
by nonmember functions. A derived class inherits all members from the base
class.
User-defined types Classes
Variables Objects
Structure members Instance variables
Functions Methods
Function call Message passing
OBJECT ORIENTED LANGUAGES
It is well known that Object Oriented Programming provides major
advantages in the creation and maintenance of software. These include shorter
development time and a high degree of code sharing and flexibility. These
advantages make object oriented programming an important technology for
building complex software systems now and in the future. A number of languages
are claimed to be object oriented. The following are certain well-known Object
Oriented Programming languages:
• Common Lisp Object System (CLOS)
• Object Pascal
• Object C
• C++
• Java
• C#

0 comments
Post a Comment