AMC ENGINEERING COLLEGE
Benefits of Object oriented Programming
1. Simplicity: Software objects model real world objects, so the complexity is reduced and
the program structure is very clear.
2. Modularity: Each object forms a separate entity whose internal workings are decoupled from other
parts of the system.
3. Modifiability: It is easy to make minor changes in the data representation or the procedures in
an OO program. Changes inside a class do not affect any other part of a program, since the only
public interface that the external world has to a class is through the use of methods.
4. Extensibility: adding new features or responding to changing operating environments can
be solved by introducing a few new objects and modifying some existing ones.
5. Maintainability: objects can be maintained separately, making locating and fixing problems easier.
6. Re-usability: objects can be reused in different programs.
C++ is an object oriented programming language. It was developed by Bjarne Stroustrup in 1979 at
Bell Laboratories in Murray Hill, New Jersey. He initially called the new language "C with Classes."
However, in 1983 the name was changed to C++.
C++ is a superset of C. Stroustrup built C++ on the foundation of C, including all of C’s features,
attributes, and benefits. Most of the features that Stroustrup added to C were designed to support
object-oriented programming .These features comprise of classes, inheritance, function overloading
and operator overloading. C++ has many other new features as well, including an improved
approach to input/output (I/O) and a new way to write comments.
A Simple C++ Program
cout<< “Simple C++ program without using class”;
Lines beginning with a hash sign (#) are directives read and interpreted by what is known as the
preprocessor. They are special lines interpreted before the compilation of the program itself
begins. In this case, the directive #include <iostream.h>, instructs the preprocessor to include a
section of standard C++ code, known as header iostream that allows to perform standard input
and output operations, such as writing the output of this program to the screen.
OOPS WITH C++ - 10CS36
VEENA BHAT, Department of CSE