Unit 1
Unit 1
Object Information
Message
Advantages of OPP
• Oop offers several benefits to both the program designer and the user. Object-oriented contributes to the solution of many
problems associated with the development and quality of software products. The principal advantages are :
• Through inheritance we can eliminate redundant code and extend the use of existing classes.
• We can build programs from the standard working modules that communicate with one another, rather than having to start
writing the code from scratch. This leads to saving of development time and higher productivity.
• This principle of data hiding helps the programmer to build secure programs that can’t be invaded by code in other parts of
the program.
• It is possible to have multiple instances of an object to co-exist with out any interference.
• It is easy to partition the work in a project based on objects.
• Object-oriented systems can be easily upgraded from small to large systems.
• Message passing techniques for communication between objects makes the interface description with external systems
much simpler.
• Software complexity can be easily managed.
Applications of OPP
• The most popular application of oops up to now, has been in the area of user interface design such as
windows. There are hundreds of windowing systems developed using oop techniques.
• Real business systems are often much more complex and contain many more objects with complicated
attributes and methods. Oop is useful in this type of applications because it can simplify a complex
problem. The promising areas for application of oop includes.
• Real – Time systems.
• Simulation and modeling
• Object oriented databases.
• Hypertext,hypermedia and expertext.
• Al and expert systems.
• Neural networks and parallel programming.
• Dicision support and office automation systems.
• CIM / CAM / CAD system.
Basics of C++
• C ++ is an object oriented programming language, C ++ was developed by
Jarney Stroustrup at AT & T Bell lab, USA in early eighties. C ++ was
developed from c and simula 67 language. C ++ was early called ‘C with
classes’.
Features of C++
Structure of C++ Program
• A C++ program consist four sections as shown in following fig.This
section may be placed in a separate code files and then compiled
independently or jointly.
Structure of C++ Program
• Section I : Header File Declaration Section
1. Header Files used in the program are listed here.
2. Header files provides prototype declarations for different library
functions.
3. Basically all preprocessor directives are written in this section.
Structure of C++ Program
• Section II : Global Declaration Section
1. Global Variables are declared here.
2. Global Declaration include
Declaring structure
Declaring class
Declaring variable.