|Uploaded:||Jan 03, 2019|
|Rating:||Based on 1 user ratings|
download cpp balaguruswamy pdfPaper Code:
Lesson no: 1
Author: Pooja Chawla
Paper Name: OOP with C++
Lesson Name: Introduction of OOP
Vetter: Prof. Dharminder Kumar
1.1 Software crisis
1.2 Software Evaluation
1.3 POP (Procedure Oriented Programming)
1.4 OOP (Object Oriented Programming)
1.5 Basic concepts of OOP
1.5.3 Data Abstraction and Data Encapsulation
1.5.6 Dynamic Binding
1.5.7 Message Passing
1.6 Benefits of OOP
1.7 Object Oriented Language
1.8 Application of OOP
1.9 Introduction of C++
1.9.1 Application of C++
1.10 Simple C++ Program
1.10.1 Program Features
1.10.3 Output Operators
1.10.4 Iostream File
1.10.6 Return Type of main ()
1.11 More C++ Statements
1.11.2 Input Operator
1.11.3 Cascading I/O Operator
1.12 Example with Class
1.13 Structure of C++
1.14 Creating Source File
1.15 Compiling and Linking
1.1 Software Crisis
Developments in software technology continue to be dynamic. New tools and techniques
are announced in quick succession. This has forced the software engineers and industry to
continuously look for new approaches to software design and development, and they are
becoming more and more critical in view of the increasing complexity of software
systems as well as the highly competitive nature of the industry. These rapid advances
appear to have created a situation of crisis within the industry. The following issued need
to be addressed to face the crisis:
• How to represent real-life entities of problems in system design?
• How to design system with open interfaces?
• How to ensure reusability and extensibility of modules?
• How to develop modules that are tolerant of any changes in future?
• How to improve software productivity and decrease software cost?
• How to improve the quality of software?
• How to manage time schedules?
1.2 Software Evaluation
Ernest Tello, A well known writer in the field of artificial intelligence, compared the
evolution of software technology to the growth of the tree. Like a tree, the software
evolution has had distinct phases “layers” of growth. These layers were building up one
by one over the last five decades as shown in fig. 1.1, with each layer representing and
improvement over the previous one. However, the analogy fails if we consider the life
of these layers. In software system each of the layers continues to be functional,
whereas in the case of trees, only the uppermost layer is functional
Object Oriented Programming
Alan Kay, one of the promoters of the object-oriented paradigm and the principal
designer of Smalltalk, has said: “As complexity increases, architecture dominates the
basic materials”. To build today’s complex software it is just not enough to put together a
sequence of programming statements and sets of procedures and modules; we need to
incorporate sound construction techniques and program structures that are easy to
comprehend implement and modify.
With the advent of languages such as c, structured programming became very popular
and was the main technique of the 1980’s. Structured programming was a powerful tool
that enabled programmers to write moderately complex programs fairly easily. However,
as the programs grew larger, even the structured approach failed to show the desired
result in terms of bug-free, easy-to- maintain, and reusable programs.
Object Oriented Programming (OOP) is an approach to program organization and
development that attempts to eliminate some of the pitfalls of conventional programming
methods by incorporating the best of structured programming features with several
powerful new concepts. It is a new way of organizing and developing programs and has
nothing to do with any particular language. However, not all languages are suitable to
implement the OOP concepts easily.
1.3 Procedure-Oriented Programming
In the procedure oriented approach, the problem is viewed as the sequence of things to
be done such as reading, calculating and printing such as cobol, fortran and c. The
primary focus is on functions. A typical structure for procedural programming is shown
in fig.1.2. The technique of hierarchical decomposition has been used to specify the tasks
to be completed for solving a problem.
Fig. 1.2 Typical structure of procedural oriented programs