Search Ebook here:


C++ Programming: An Object-Oriented Approach



C++ Programming: An Object-Oriented Approach

Author: Behrouz A. Forouzan and Richard Gilberg

Publisher: McGraw-Hill Education

Genres:

Publish Date: March 29, 2019

ISBN-10: 1260547728

Pages: 959

File Type: PDF

Language: English

read download

Ads

Book Preface

C++ Programming: An Object-Oriented Approach

This book complements a course designed to teach object-oriented programming using the syntax of the C++ language. It will also prepare students for advanced concepts such as data structure and design patterns. Students who have completed this course will be ready to take on any other object-oriented language course, a data-structure course, or a course about design patterns.

What Is the C++ Language?

C++ is a progressive programming language derived from its predecessors, the C language and the B language. The C++ language expands the idea of a struct to a class in which different objects can be created from one single definition of a class with different values for each data element.

Furthermore, the C++ language explores the idea of object-oriented languages that simulate real life. In real life, we define a type and then we have objects of that type. In the C++ language, we define a class and then we create objects from that class. C++ also includes the idea of inheritance. In inheritance, we can create a class and then extend the definition to create other classes, just as in real life where the idea of an animal can be extended to create the idea of a horse, a cow, a dog, and so on. Perhaps the most interesting addition to C++ is the idea of polymorphism. Polymorphism gives us the ability to write several versions of an action with the same name to be used by different objects. This practice is found in real life when we use the verb open. We can say that we open a business, open a can, open a door, and so on. Although the word open is used in all cases, it elicits different actions on different objects. The most recent additions to C++ include the Standard Template Library (STL), a collection of predefined complex objects and actions that can be applied to those objects, as well as design patterns to make problem solving more efficient and coherent.

Why This Book?
The book has five distinctive goals as discussed below.
Teach Computer Programming
The book can be used as the first course in computer programming using the C++ language as the vehicle. Chapters 1 to 6 are designed for this purpose. They discuss computer systems and languages. They also discuss the basics of the C++ syntax and program controls, such as decisions and repetitions. Chapters 1 to 6 are essential to learning programming using the C++ language.

Teach the Syntax of the C++ Language
Chapters 7 to 12 are essential in the study of object-oriented programming. Although Chapters 8 and 9 are not directly related to the object oriented features of C++, we believe that these two chapters can be taught after students understand the basics of object-oriented programming, which are discussed in Chapter 7.

Present New Features of C++
Chapters 13 to 17 discuss other topics normally taught in a first or second course in programming. They can be taught in any order. Discuss Data Structure and Introduce the STL Library Chapters 18 and 19 are an introduction to data structures. They prepare students for a course in data structures.

Introduce Design Patterns
Chapter 20 (which can be found online) gives simple and alternative solutions to some typical problems in object-oriented programming that would be more difficult to solve if patterns were not used. Chapter 20 gives students an insight to object-oriented programming through a set of standard solutions to specific problems. Although design patterns are normally taught in computer graphics courses, we have applied them to nongraphic problems for students who have no graphical programming experience.

Brief Table of Contents

Preface xv
Chapter 1 Introduction to Computers and Programming Languages 1
Chapter 2 Basics of C++ Programming 19
Chapter 3 Expressions and Statements 59
Chapter 4 Selection 112
Chapter 5 Repetition 158
Chapter 6 Functions 208
Chapter 7 User-Defined Types: Classes 273
Chapter 8 Arrays 338
Chapter 9 References, Pointers, and Memory Management 380
Chapter 10 Strings 443
Chapter 11 Relationships among Classes 496
Chapter 12 Polymorphism and Other Issues 553
Chapter 13 Operator Overloading 597
Chapter 14 Exception Handling 657
Chapter 15 Generic Programming: Templates 693
Chapter 16 Input/Output Streams 716
Chapter 17 Recursion 776
Chapter 18 Introduction to Data Structures 813
Chapter 19 Standard Template Library (STL) 852
Chapter 20 Design Patterns Available online

Appendixes A-R Available online
Appendix A Unicode
Appendix B Positional Numbering System
Appendix C C++ Expressions and Operators
Appendix D Bitwise Operations
Appendix E Bit Fields
Appendix F Preprocessing
Appendix G Namespaces
Appendix H Ratios
Appendix I Time
Appendix J Lambda Expressions
Appendix K Regular Expressions
Appendix L Smart Pointers
Appendix M Random Number Generation
Appendix N References
Appendix O Move versus Copy
Appendix P A Brief Review of C++ 11
Appendix Q Unified Modeling Language (UML)
Appendix R Bitset
CheckPoints Available online
True/False Questions Available online
Review Questions Available online
Glossary Available online
Index 915


Download EbookRead NowFile TypeUpload Date
Download hereRead Now

Ads

PDFMay 26, 2019


Do you like this book? Please share with your friends, let's read it !! :)

How to Read and Open File Type for PC ?