简介 |
![]()
内容推荐 本书以简单易懂的方式向读者介绍了C++面向对象程序设计的基本方法和软件发展的基本状况。作者在上一版的基础上完善了每章的学习目标和例程。每章的后面都附有大量的新练习题。无论从科学的角度,还是从工程的角度,第三版都是C++程序设计课程的完美教材。 本书以循序渐进的方式介绍C++,教学内容正好适合一学期的课程教学。从实用角度出发介绍了使用C++语言进行面向对象编程的方法和技巧。内容涵盖C++语言的数据类型、控制结构、语义语法分析以及软件开发方法,同时还列举了大量的实例,帮助读者加深对所学内容的理解和上机实践能力的提高。 目录 1 Overview of Programming and Problem Solving 1.1 Overview of Programming What Is Programming? How Do We Write a Program? What Is an Algorithm? What Is a Programming Language? 1.2 How Does a Computer Run a Program? What Kinds of Instructions Can Be Written in a Program ming Language? What Is Software Maintenance? Software Maintenance Case Study: An Introduction to Software Maintenance 1.3 What's Inside the Computer? 1.4 Ethics and Responsibilities in the Computing Profession Software Piracy Privacy of Data Use of Computer Resources Software Engineering 1.5 Problem-Solving Techniques Ask Questions Look for Things That Are Familiar Solve by Analogy Means-Ends Analysis Divide and Conquer The Building-Block Approach Merging Solutions Mental Blocks: The Fear of Starting Algorithmic Problem Solving Problem-Solving Case Study: Leap Year Algorithm Summary Quick Check Answers Exam Preparation Exercises Programming Warm-Up Exercises Case Study Follow-Up Line Number 2 C++ Syntax and Semantics, and the Program Development Process 2.1 The Elements of C++ Programs C++ Program Structure Syntax and Semantics Syntax Templates Naming Program Elements: Identifiers Data and Data Types Naming Elements: Declarations Taking Action: Executable Statements Beyond Minimalism: Adding Comments to a Program 2.2 Program Construction Blocks (Compound Statements) The C++ Preprocessor Software Maintenance Case Study: Adding Titles to Names 2.3 More About Output Creating Blank Lines Inserting Blanks Within a Line Special Characters 2.4 Program Entry, Correction, and Execution Entering a Program Compiling and Running a Program Problem-Solving Case Study: Printing a Chessboard Testing and Debugging Summary Quick Check Answers Exam Preparation Exercises Programming Warm-Up Exercises Programming Problems Case Study Follow-Up …… 3 Numeric Types, Expressions, and Output 4 Program Input and the Software Design Process 5 Conditions, Logical Expressions, and Selection Control Structures 6 Looping 7 Additional Control Structures 8 Functions 9 Scope, Lifetime, and More on Functions 10 User-Defined Data Types 11 Arrays 12 Classes and Abstraction 13 Recursion Appendices Index |