Preface to the Second Edition Preface to the First Edition Brief Contents Introduction to C++ p. 1 A Review of Structures p.

Similar documents
Object Oriented Programming

Welcome to Teach Yourself Acknowledgments Fundamental C++ Programming p. 2 An Introduction to C++ p. 4 A Brief History of C++ p.

10CS36: Object Oriented Programming with C++

RAJIV GANDHI COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY OBJECT ORIENTED PROGRAMMING QUESTION BANK UNIT I 2 MARKS

Object Oriented Programming with c++ Question Bank

The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured

JAYARAM COLLEGE OF ENGINEERING AND TECHNOLOGY Pagalavadi, Tiruchirappalli (An approved by AICTE and Affiliated to Anna University)

Jayaram college of Engineering and Technology, Pagalavadi. CS2203 Object Oriented Programming Question Bank Prepared By: S.Gopalakrishnan, Lecturer/IT

Absolute C++ Walter Savitch

Advanced C++ Programming Workshop (With C++11, C++14, C++17) & Design Patterns

Get Unique study materials from

VALLIAMMAI ENGINEERING COLLEGE

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

MaanavaN.Com CS1203 OBJECT ORIENTED PROGRAMMING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Cpt S 122 Data Structures. Course Review Midterm Exam # 2

KLiC C++ Programming. (KLiC Certificate in C++ Programming)

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

Java Fundamentals p. 1 The Origins of Java p. 2 How Java Relates to C and C++ p. 3 How Java Relates to C# p. 4 Java's Contribution to the Internet p.

CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object

END TERM EXAMINATION

B.C.A 2017 OBJECT ORIENTED PROGRAMMING USING C++ BCA303T MODULE SPECIFICATION SHEET

Problem Solving with C++

An Object Oriented Programming with C

And Even More and More C++ Fundamentals of Computer Science

Introduction to C++ Systems Programming

Interview Questions of C++

Introduction to Programming Using Java (98-388)

CS201 - Introduction to Programming Glossary By

Syllabus of C++ Software for Hands-on Learning: This course offers the following modules: Module 1: Getting Started with C++ Programming

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Lesson Plan. Subject: OBJECT ORIENTED PROGRAMMING USING C++ :15 weeks (From January, 2018 to April,2018)

Short Notes of CS201

Intro to OOP Visibility/protection levels and constructors Friend, convert constructor, destructor Operator overloading a<=b a.

Chapter 15 - C++ As A "Better C"

Quiz Start Time: 09:34 PM Time Left 82 sec(s)

CS201 Latest Solved MCQs

C++ for System Developers with Design Pattern

OBJECT ORIENTED DATA STRUCTURE & ALGORITHMS

OBJECT ORIENTED PROGRAMMING USING C++

CHOICE BASED CREDIT SYSTEM (With effect from )

Contents. 2 Introduction to C++ Programming,


CGS 2405 Advanced Programming with C++ Course Justification

Computer Science (330)

B.Sc II Year Computer Science (Optional)

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

CERTIFICATE IN WEB PROGRAMMING

Deitel Series Page How To Program Series

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions.

C++ Coding Standards. 101 Rules, Guidelines, and Best Practices. Herb Sutter Andrei Alexandrescu. Boston. 'Y.'YAddison-Wesley

index C++ language characters ASCII codes, 16 escape sequence, 19 trigraph sequence, 18 UCS codes, 17 Unicode, 17 classes, 7 code presentation styles,

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Time : 3 hours. Full Marks : 75. Own words as far as practicable. The questions are of equal value. Answer any five questions.

M.C.A DEGREE EXAMINATION,NOVEMBER/DECEMBER 2010 Second Semester MC 9222-OBJECT ORIENTED PROGRAMMING (Regulation 2009)

Appendix. Grammar. A.1 Introduction. A.2 Keywords. There is no worse danger for a teacher than to teach words instead of things.

Practical C++ Programming

C++ (Non for C Programmer) (BT307) 40 Hours

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries

Introduction to C++ Professor Hugh C. Lauer CS-2303, System Programming Concepts

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

SAURASHTRA UNIVERSITY

Object Oriented Programming. Solved MCQs - Part 2

CS3157: Advanced Programming. Outline

Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and

AN OVERVIEW OF C++ 1

W3101: Programming Languages C++ Ramana Isukapalli

C++ Primer, Fifth Edition

ECE 3574: Dynamic Polymorphism using Inheritance

Table of Contents Preface Bare Necessities... 17

cs3157: c++ lecture #2 (mon-11-apr-2005) chronology of some programming languages... C++ vs Java identifiers.

CHAPTER 1: A CRASH COURSE IN C++ 3 CHAPTER 2: DESIGNING PROFESSIONAL C++ PROGRAMS 49

G52CPP C++ Programming Lecture 15

Contents. 1 Introduction to Computers, the Internet and the World Wide Web 1. 2 Introduction to C Programming 26

STRUCTURING OF PROGRAM

Real Time & Embedded Linux Solutions. C++ and OOD for Embedded Systems. משך הקורס 40 שעות לימוד ותרגול בשיטת Hands-on-Training

This page intentionally left blank

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK

Certification In Java Language Course Course Content

Dot Net Online Training

C++ How To Program 10 th Edition. Table of Contents

Polymorphism. Zimmer CSCI 330

B. V. Patel Institute of Business Management, Computer & Information Technology

Tokens, Expressions and Control Structures

XII- COMPUTER SCIENCE VOL-II MODEL TEST I

IBM i Version 7.2. Programming IBM Rational Development Studio for i ILE C/C++ Language Reference IBM SC

Object Oriented Paradigm

Increases Program Structure which results in greater reliability. Polymorphism

CPSC 427: Object-Oriented Programming

Question Paper Code : 97044

Learning Objectives. C++ For Artists 2003 Rick Miller All Rights Reserved xli

Jh fouk;d egkfo ky;] xkmjokjk RANI DURGAVATI VISHWAVIDYALAYA, JABALPUR BACHLOR OF COMPUTER APPLICATION BCA SYLLABUS THIRD SEMESTER

Microsoft Visual C# Step by Step. John Sharp

Proposed Syllabus for F.Y.B.Sc. (Information Technology) (w.e.f. June-2015)

Computer Science 306 Study Guide

Learning C# 3.0. Jesse Liberty and Brian MacDonald O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo

These new operators are intended to remove some of the holes in the C type system introduced by the old C-style casts.

C++ Programming: Polymorphism

IS 0020 Program Design and Software Tools

Transcription:

Preface to the Second Edition p. iii Preface to the First Edition p. vi Brief Contents p. ix Introduction to C++ p. 1 A Review of Structures p. 1 The Need for Structures p. 1 Creating a New Data Type Using Structures p. 4 Using Structures in Application Programs p. 5 Procedure-Oriented Programming Systems p. 5 Object-Oriented Programming Systems p. 7 Comparison of C++ with C p. 8 Console Input/Output in C++ p. 9 Console Output p. 9 Console Input p. 12 Variables in C++ p. 13 Reference Variables in C++ p. 14 Function Prototyping p. 19 Function Overloading p. 21 Default Values for Formal Arguments of Functions p. 23 Inline Functions p. 25 Classes and Objects p. 31 Introduction to Classes and Objects p. 31 Private and Public Members p. 33 Objects p. 36 Scope Resolution Operator p. 37 Creating Libraries Using the Scope Resolution Operator p. 38 Using Classes in Application Programs p. 39 this Pointer p. 40 Data Abstraction p. 45 Explicit Address Manipulation p. 47 Arrow Operator p. 47 Calling One Member Function from Another p. 48 Member Functions and Member Data p. 49 Overloaded Member Functions p. 49 Default Values for Formal Arguments of Member Functions p. 51 Inline Member Functions p. 52 Constant Member Functions p. 52 Mutable Data Members p. 54 Friends p. 54 Static Members p. 59 Objects and Functions p. 65

Objects and Arrays p. 66 Arrays of Objects p. 67 Arrays Inside Objects p. 67 Namespaces p. 68 Nested Inner Classes p. 71 Dynamic Memory Management p. 78 Introduction p. 78 Dynamic Memory Allocation p. 79 Dynamic Memory Deallocation p. 84 set_new_handler() function p. 88 Constructors and Destructors p. 92 Constructors p. 92 Zero-argument Constructor p. 94 Parameterized Constructors p. 97 Explicit Constructors p. 103 Copy Constructor p. 105 Destructors p. 109 Philosophy of OOPS p. 112 Inheritance p. 117 Introduction p. 117 Effects of Inheritance p. 118 Benefits of Inheritance p. 120 Inheritance in Actual Practice p. 120 Base Class and Derived Class Objects p. 121 Accessing Members of the Base Class in the Derived Class p. 121 Base Class and Derived Class Pointers p. 122 Function Overriding p. 127 Base Class Initialization p. 129 Protected Access Specifier p. 132 Deriving by Different Access Specifiers p. 133 Deriving by the Public Access Specifier p. 133 Deriving by the Protected Access Specifier p. 135 Deriving by the Private Access Specifier p. 136 Different Kinds of Inheritance p. 139 Multiple Inheritance p. 139 Ambiguities in Multiple Inheritance p. 141 Multi-level Inheritance p. 145 Hierarchical Inheritance p. 147 Hybrid Inheritance p. 148 Order of Invocation of Constructors and Destructors p. 149 Virtual Functions and Dynamic Polymorphism p. 153

Need for Virtual Functions p. 153 Virtual Functions p. 156 Mechanism of Virtual Functions p. 160 Pure Virtual Functions p. 162 Virtual Destructors and Virtual Constructors p. 167 Virtual Destructors p. 167 Virtual Constructors p. 168 Stream and File Handling p. 172 Streams p. 172 Class Hierarchy for Handling Streams p. 172 Text and Binary Input/Output p. 174 Data Storage in Memory p. 174 Input/Output of Character Data p. 175 Input/Output of Numeric Data p. 175 Note on Opening Disk Files for I/O p. 176 Text Versus Binary Files p. 176 Text Output/Input p. 177 Text Output p. 177 Text Input p. 181 Binary Output/Input p. 185 Binary Output-write () Function p. 185 Binary Input-read () Function p. 189 Opening and Closing Files p. 193 open() Function p. 193 close() Function p. 194 Files as Objects of the fstream Class p. 194 File Pointers p. 194 seekp() Function p. 195 tellp() Function p. 196 seekg() Function p. 196 tellg() Function p. 196 Random Access to Files p. 197 Object Input/Output Through Member Functions p. 197 Error Handling p. 199 eof() Function p. 199 fail() Function p. 199 bad() Function p. 200 clear() Function p. 200 Manipulators p. 201 Pre-defined Manipulators p. 201 User-defined Manipulators p. 203

Command Line Arguments p. 204 Operator Overloading, Type Conversion, New Style Casts, and RTTI p. 211 Operator Overloading p. 211 Overloading Operators-The Syntax p. 212 Compiler Interpretation of Operator-Overloading Functions p. 214 Overview of Overloading Unary and Binary Operators p. 216 Operator Overloading p. 216 Rules for Operator Overloading p. 219 Overloading Various Operators p. 221 Overloading Increment and Decrement Operators (Prefix and Postfix) p. 221 Overloading Unary Minus and Unary Plus Operator p. 224 Overloading Arithmetic Operators p. 225 Overloading Relational Operators p. 230 Overloading Assignment Operator p. 234 Overloading Insertion and Extraction Operators p. 240 Overloading new and delete Operators p. 244 Overloading Subscript Operator p. 261 Overloading Pointer-to-member (->) Operator (Smart Pointer) p. 265 Type Conversion p. 267 Basic Type to Class Type p. 267 Class Type to Basic Type p. 268 Class Type to Class Type p. 269 New Style Casts and the typeid Operator p. 271 dynamic_cast Operator p. 271 static_cast Operator p. 275 reinterpret_cast Operator p. 276 const_cast Operator p. 276 typeid Operator p. 277 Data Structures p. 283 Introduction p. 283 Linked Lists p. 284 Stacks p. 336 Queues p. 340 Trees p. 343 Binary Trees p. 344 Binary Search Trees p. 347 Templates p. 372 Introduction p. 372 Function Templates p. 373 Class Templates p. 378 Nested Class Templates p. 382

Standard Template Library p. 382 list Class p. 383 vector Class p. 386 pair Class p. 387 map Class p. 387 set Class p. 389 multimap Class p. 389 multiset Class p. 390 Exception Handling p. 393 Introduction p. 393 C-Style Handling of Error-generating Code p. 394 Terminate the Program p. 394 Check the Parameters before Function Call p. 395 Return a Value Representing an Error p. 396 C++-Style Solution-the try/throw/catch Construct p. 397 It is Necessary to Catch Exceptions p. 400 Unwinding of the Stack p. 401 Need to Throw Class Objects p. 404 Accessing the Thrown Object in the Catch Block p. 406 Throwing Parameterized Objects of a Nested Exception Class p. 408 Catching Uncaught Exceptions p. 409 Re-throwing Exceptions p. 410 Limitation of Exception Handling p. 414 Case Study-A Word Query System p. 417 Problem Statement p. 417 A Sample Run p. 417 The Source Code p. 418 Explanation of the Code p. 420 Comparison of C++ with C p. 425 Non-object-oriented Features Provided in C++ that are Absent in C Language p. 425 Object-oriented Features Provided in C++ to make it Comply with the Requirements of the p. 426 Object-Oriented Programming System Comparison of C++ with Java p. 427 Similarities between C++ and Java p. 427 Differences between C++ and Java p. 428 Object-Oriented Analysis and Design p. 437 Introduction p. 437 Why Build Models? p. 437 Overview of OOAD p. 437 Object-Oriented Model p. 438 Object Model p. 438 Dynamic Model p. 442

Functional Model p. 444 Analysis p. 446 Overview of Analysis p. 446 Object Modelling p. 446 Dynamic Modelling p. 446 Functional Modelling p. 447 System Design p. 447 Breaking the System into Sub-systems p. 447 Layers p. 447 Partitions p. 447 Object Design p. 448 Overview of Object Design p. 448 Implementation p. 448 Glossary p. 449 Self Tests p. 454 p. 454 p. 456 p. 458 Bibliography p. 460 Index p. 461 Table of Contents provided by Blackwell's Book Services and R.R. Bowker. Used with permission.