Contents
Guide
Li Zheng, Yuan Dong, Fang Yang
C++ Programming
Also of Interest
Web Applications with Javascript or Java, vol. 1
G. Wagner, M. Diaconescu, 2017
ISBN 978-3-11-049993-3, e-ISBN (PDF) 978-3-11-049995-7, e-ISBN (EPUB) 978-3-11-049724-3
Web Applications with Javascript or Java, vol. 2
G. Wagner, M. Diaconescu, 2017
ISBN 978-3-11-050024-0, e-ISBN (PDF) 978-3-11-050032-5, e-ISBN (EPUB) 978-3-11-049756-4
Color Image Watermarking
Q. Su, 2016
ISBN 978-3-11-048757-2, e-ISBN (PDF) 978-3-11-048773-2, e-ISBN (EPUB) 978-3-11-048763-3, Set-ISBN 978-3-11-048776-3
Trusted Computing
D. Feng, 2017
ISBN 978-3-11-047604-0, e-ISBN (PDF) 978-3-11-047759-7, e-ISBN (EPUB) 978-3-11-047609-5, Set-ISBN 978-3-11-047760-3
Authors
Dr. Li Zheng
Tsinghua University
Dept. of Computer Science and Technology
Haidian District, 30 Shuangqing Road
100084 Beijing, China
Dr. Yuan Dong
Tsinghua University
Dept. of Computer Science and Technology
Haidian District, 30 Shuangqing Road
100084 Beijing, China
Dr. Fang Yang
Tsinghua University, Dept. of Foreign Languages
Haidian District, 30 Shuangqing Road
100084 Beijing, China
ISBN 978-3-11-046943-1
e-ISBN (PDF) 978-3-11-047197-7
e-ISBN (EPUB) 978-3-11-047066-6
Library of Congress Control Number: 2018941441
Bibliographic information published by the Deutsche Nationalbibliothek
The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available on the Internet at http://dnb.dnb.de.
2019 Walter de Gruyter GmbH, Berlin/Boston
Cover image: tostphoto/iStock/thinkstock
www.degruyter.com
Preface
This book draws on the authors extensive teaching experience on C++ and takes its current form after incorporating valuable advices from colleagues and students.
1.Background of Writing This Book
C++ is an object-oriented programming language, which is evolved from C. C++ has two main characteristics: one is its full compatibility with C and the other is that it supports object-oriented methods.
The object-oriented program design encapsulates both data and related operations to form an interdependent and indivisible whole an object. By abstracting common features of objects of the same category, we can get a class . Most data in a class can only be processed by the methods encapsulated in the class. A class communicates with the outside world through a simple external interface, and objects communicate with each other through messages. In this way, we can have simple relationships among program modules, and module independency and data security can be ensured. Meanwhile, through inheritance and polymorphism, codes can be well reused, which facilitates both the development and maintenance of software.
Because of the outstanding qualities of object-oriented methods, they have now become the major ways to develop large-scale software, and C++ is one of the most widely used object-oriented programming languages.
C++ has long been considered hard to use, and is seldom used as an introduction language for teaching. Are C++ and object-oriented program design indeed hard to learn? The answer is no. In fact, when C was first created, it was only used by a few professional developers. However, along with the development of computer science, computer technologies have permeated research and applications of different subjects. Now C has been widely used by various engineers and technicians, and it has also been used as the introduction programming language in many schools. C++ is fully compatible with C, although it provides a stricter and more secure grammar. In this sense, C++ is primarily a better C.
C++ is an Object-Oriented Programming (OOP) language. OOP has once been considered a comparatively advanced technology. This is because before the theories of Object-Oriented Analysis (OOA) and Object-Oriented Design (OOD) were developed, in order to write a good object-oriented program, programmers would first learn to use object-oriented methods to understand and describe problems. Now, since the work of understanding problem domains and designing system components are done during the phases of system analysis and system design, the work of OOP becomes much easier it is just to write every component of an OOD model with an object-oriented programming language.
The emergence of object-oriented methods is in fact a process where the program design gets back to its roots. Essentially, software development aims to correctly understand problems that the software needs to handle and to accurately describe the understandings. The fundamental principle that object-oriented methods emphasize is to develop software directly facing the objective existence, and to apply the ways of human thinking and human expressions to software development. Thus, software development can return back to the real world from past methods, rules and skills that are extravagantly specialized.
Thus, do we need to learn C before learning C++? No.Although C++ is evolved from C, C++ itself is an integral programming language, and it has a completely different design philosophy from C. Our learning course does not need to exactly follow the development course of science and technology. Only by mastering the latest theories and technologies quickly can we stand on the shoulders of giants.
Thus, we think that C++ can be taught as an introduction programming language.
2.Features of this book
This book is comprehensive, tries to explain problems in simple terms, and has abundant complementary materials.
This book is for programmer beginners. Since the publication of the first edition in 1999, the book has been used by different majors in many universities including Tsinghua University, and has achieved good effects.
Using C++ as the introduction programming language for college students, this book not only details the language itself, but also introduces data structures, algorithms, object-oriented design ideas and programming, and the Unified Modeling Language (UML). In each chapter of this book, we first introduce the related object-oriented programming ideas and methods, and then expound the necessary grammar through practical examples, explaining its meaning and usage primarily from the aspect of programming methodology. The purpose of this book is to make readers be able not only to master the C++ language itself, but also to use computer languages to describe simple practical problems and their solutions. However, to describe complex problems, readers still have to learn other object-oriented courses such as object-oriented software engineering.