注冊(cè) | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當(dāng)前位置: 首頁出版圖書科學(xué)技術(shù)計(jì)算機(jī)/網(wǎng)絡(luò)軟件與程序設(shè)計(jì)C/C++及其相關(guān)C++程序設(shè)計(jì)(第2版 影印版)

C++程序設(shè)計(jì)(第2版 影印版)

C++程序設(shè)計(jì)(第2版 影印版)

定 價(jià):¥41.00

作 者: (美)戴爾等著
出版社: 高等教育出版社
叢編項(xiàng): 國(guó)外優(yōu)秀信息科學(xué)與技術(shù)系列教學(xué)用書
標(biāo) 簽: C++

ISBN: 9787040100389 出版時(shí)間: 2001-06-01 包裝: 平裝
開本: 頁數(shù): 752 字?jǐn)?shù):  

內(nèi)容簡(jiǎn)介

  本書從實(shí)用角度出發(fā)介紹了使用C++語言進(jìn)行面向?qū)ο缶幊痰姆椒ê图记?。?nèi)容涵蓋C++語言的數(shù)據(jù)類型、控制結(jié)構(gòu)、語義語法分析以及軟件開發(fā)方法,同時(shí)還列舉了大量的實(shí)例,幫助讀者加深對(duì)所學(xué)內(nèi)容的理解和上機(jī)實(shí)踐能力的提高。本書在第一版基礎(chǔ)上進(jìn)行了修訂,不僅在內(nèi)容上進(jìn)行了調(diào)整,增加了在編寫第一版時(shí)認(rèn)為比較超前而未選用的內(nèi)容,同時(shí)還將C++版本升級(jí)為ISO/ANSI標(biāo)準(zhǔn)C++程序語言。每章在最前面提出本章學(xué)習(xí)要求,每章后配有快速測(cè)試、備考練習(xí)、編程熱身練習(xí)和習(xí)題解答,便于讀者把握每章重點(diǎn)和難點(diǎn)。本書可作為高等學(xué)校教材,也可供從事軟件開發(fā)的技術(shù)人員學(xué)習(xí)參考。內(nèi)容:1.程序設(shè)計(jì)與計(jì)算方法概述2.C++句法、語義及程序開發(fā)流程3.數(shù)值類型、表達(dá)式及輸出4.程序輸入及軟件設(shè)計(jì)方法5.條件、邏輯表達(dá)式及分支控制結(jié)構(gòu)6.循環(huán)7.函數(shù)8.作用域、生命周期及函數(shù)的相關(guān)信息9.其他控制結(jié)構(gòu)10.數(shù)據(jù)類型:系統(tǒng)提供類型和用戶自定義類型11.結(jié)構(gòu)類型、數(shù)據(jù)抽象和類12.數(shù)組13.基于數(shù)組的表14.面向?qū)ο蟮能浖_發(fā)方法15.遞歸

作者簡(jiǎn)介

暫缺《C++程序設(shè)計(jì)(第2版 影印版)》作者簡(jiǎn)介

圖書目錄

1 Overview of Programming and Problem Solving    1
  1.1 Overview of Programming   2
     What is Programming?    2
      How Do We Write a Program?  2
  1.2 What is a Programming Language?    7
  1.3 What is a Computer?    11
  1.4   Ethics and Responsibilities in the Computer Profession    15
     Software Priacy    15
     Privacy of Data    16
     Use of Computer Resources    16
     Software Engineering    17
  1.5  Problem-Solving Techniques    17
     Ask Questions    18
     Look for Things That Are Familiar    19
     Solve by Analogy    19
     Means-Ends Analysis    19
     Divide and Conquer    20
     The Building-Block Approach    20
     Merging Solutions     21
     Algorithmic Problem Solving    22
    Summary    22
2 C++ Syntax and Semantics, and the Program development process    25
  2.1 The Elements of C++ Programs     26
     C++ Program Structure    26
     Syntax and Semantics    28
     Syntax Templates    30
     Naming Program Elements: Identifiers    31
     Data and Data Types    33
     Naming Elements: Declarations    34
     Taking Action: Executable Statements    38
     Beyond Minimalism: Adding Comments to a Program    43
  2.2 Program Construction    44
     Blocks (Compound Statements)    46
     The C++ Preprocessor    47
     An Introduction to Namespaces    49
  2.3 More About Output    50
     Creating Blank Lines    50
     Inserting Blanks Within a Line    51
  Programming Example: Contest Letter    53
  Testing and Debugging    57
  Summary    59
    Quick Check    59
    Exam Preparation Exercises    62
    Programming Warm-up Exercises    65
    Programming Problems    67
3 Numeric Type, Expressions, and Output
  3.1 Overview of C++ Data Types    70
  3.2  Numeric Data Types    70
     Integral Types    71
     Floating-Point Types   72
  3.3 Declarations for Numeric Types    73
     Named Constant Declarations    73
  3.4 Simple Arithmetic Expressions    74
     Arithmetic Operators    75
     Increment and Decrement Operators    78
  3.5 Compound Arithmetic Expressions    78
     Precedence Rules    79
     Type Coercion and Type Casting    80
  3.6 Function Calls and Library Functions    83
     Value-Returning Functions    83
     Library Functions    85
     Void Functions    86
  3.7 Formatting the Output    87
     Integers and Strings    87
     Floating-Point numbers    90
  3.8 Additional string Operations    94
     The length and size Functions    94
     The find Function    95
     The substr Function    97
  Programming Example: Map Measurements    99
  Testing and Debugging    102
  Summary    103
    Quick Check    103
    Exam Preparation Exercises    106
    Programming Warm-up Exercises    109
    Programming Problems    113
4 Program Input and the Software Design Process    115
  4.1 Getting Data into Programs     116
     Input Streams and the Extraction Operator(>>)    116
     The Reading Marker and the Newline Character    119
     Reading Character Data with the get Function    120
     Skipping Characters with the ignore Function    122
     Reading String Data    123
  4.2 Interactive Input/Output    125
  4.3 Noninteractive Input/Output    126
  4.4 File Input and Output    127
     Files    127
     Using Files  127
     An Example Program Using Files  130
      Run-Time Input of File Names    133
  4.5 Input Failure    134
  4.6 Software Design Methodologies    135
  4.7 What Are Objects?    136
  4.8 Object-Oriented Design    138
  4.9 Functional Decomposition    138
     Modules    140
     A Perspective on Design    141
  Programming Example: Stretching a Canvas    142
  Testing and Debugging    147
   Testing and Debugging Hints    148
  Summary    149
    Quick Check    150
    Exam Preparation Exercises    151
    Programming Warm-up Exercises    153
    Programming Problems    155
5 Conditions, Logical Expressions, and Selection Control Structures    157
  5.1 Flow of Control    158
     Selection    159
  5.2 Conditions and Logical Expressions    159
     The bool Data Type    159
     Logical Expressions    160
     Precedence of Operators    166
     Relational Operators with Floating-Point Types    167
  5.3 The If Statement    168
     The If-Then-Else Form    169
     Blocks (Compound Statements)    170
     The If-Then Form    172
     A Common Mistake    173
  5.4 Nested If Statements    174
     The Dangling else    176
  5.5 Testing the State of an I/O Stream    178
  Programming Example: Warning Notices    180
  Testing and Debugging    183
    Testing in the Problem-Solving Phase:The Algorithm Walk-Through    184
    Testing in the Implementation Phase    186
    The Test Plan    191
    Tests Performed Automatically During Compilation and Execution    192
    Testing and Debugging Hints    193
  Summary    195
    Quick Check    195
    Exam Preparation Exercises    196
    Programming Warm-up Exercises    199
    Programming Problems    202
  Looping
  6.1 The While Statement    206
  6.2 Phase of Loop Execution    208
  6.3 Loops Using the While Statement    208
       Count-Controlled loops    209
       Event-Controlled Loops    209
       Looping Subtasks    212
  6.4 How to Design Loops    214
       Designing the Flow of Control    215
       Designing the Process within the Loop    216
  6.5 Nested Login    217
       Designing Nested Loops    219
  Programming Example: Average Income by Gender    220
  Testing and Debugging    223
    Loop-Testing Strategy    223
    Test Plans Involving Loops    224
    Testing and Debugging Hints    225
  Summary    227
    Quick Check    227  
    Exam Preparation Exercises    228
    Programming Warm-up Exercises    231
    Programming Problems    232
7 Functions    235
  7.1 Functional Decomposition wit Void Functions    236
     Writing Modules as Void Functions    236
  7.2 An Overview of User-Defined Functions    239
     Flow of Control in Function Calls    239
     Function Parameters    240
  7.3 Syntax and Semantics of Void Functions    241
     Function Call (Invocation)    241
     Function Declarations and Definitions    242
     Local Variables     244
     The Return Statement    245
     Header Files    246
  7.4 Parameters    247
     Value Parameters    248
     Reference Parameters    249
  7.5 Designing Functions    250
     Writing Assertions as Program Comments    252
     Documenting the Direction of Data Flow    254
  Programming Example: Comparison of Furniture-Store Sales    257
  Testing and Debugging    263
    The assert Library Function    265
    Testing and Debugging Hints    266
  Summary    267
    Quick Check    268
    Exam Preparation Exercises    269
    Programming Warm-up Exercises    275
    Programming Problems    277
8 Scope, Lifetime, and More on Functions    281
  8.1 Scope of Identifiers    282
     Scope Rules    284
     Variable Declarations and Definitions    287
     Namespaces    288
  8.2 Lifetime of a Variable    291
     Initializations in Declarations    292
  8.3 Interface Design    293
     Side Effects     294
     Global Constants    294
  8.4 Value-Returning Functions    295
     Boolean Functions    299
     Interface Design for Value-Returning Functions    300
     When to Use Value-Returning Functions    300
  Programming Example: Starship Weight and Balance    302
  Testing and Debugging    310
    Stubs and Drivers    310
    Testing and Debugging Hints    311
  Summary    312
    Quick Check    312
    Exam Preparation Exercises    313
    Programming Warm-up Exercises    317
    Programming Problems    319
9 Additional Control Structures    323
  9.1 The Switch Statement    324
  9.2 The Do-While Statement    327
  9.3 The For Statement    330
  9.4 The Break and Continue Statements    332
  9.5 Guidelines for Choosing a Looping Statement    335
  Programming Example: Monthly Rainfall Averages    336
  Testing and Debugging    340
    Testing and Debugging Hints    340
  Summary    341  
    Quick Check    341
    Exam Preparation Exercises    342
    Programming Warm-up Exercises    344
    Programming Problems    346
10 Simple Data Types: Built-In and User-Defined    349
  10.1 Built-In Simple Types    350
     Integral Types     352
     Floating-Point Types    353
  10.2  Additional C++ Operators    354
     Assignment Operators and Assignment Expressions  356
     Increment and Decrement Operators    357
     Bitwise Operators    358
     The Cast Operation    358
     The sizeof Operator    358  
     The ?: Operator    359
     Operator Precedence    359
  10.3 Working with Character Data     360
     Character Sets    361
     C++ char Constants    362
     Programming Techniques    363
  10.4  More on Floating-Point Numbers    367
     Representation of Floating-Point Numbers    367
     Arithmetic with Floating-Point Numbers    370
  10.5 User-Defined Simple Types    372
     The Typedef Statement    372
     Enumeration Types    373
     Named and Anonymous Data Types    379
     User-written Header Files    380
  10.6 More on Type Coercion    380
     Type Coercion in Arithmetic and Relational Expressions    381
     Type Coercion in Assignments, Argument Passing, and Return of a Function Value    382
  Programming Example: Rock, Paper, Scissors    384
  Testing and Debugging    391
    Floating-Point Data    391
    Coping with Input Errors    391
    Testing and Debugging Hints    392
  Summary    393
    Quick Check    393
    Exam Preparation Exercises    395
    Programming Warm-up Exercises    397
    Programming Problems    398
11 Structured Types, Data Abstraction, and Classes    401
  11.1 Simple Versus Structured Data Types    402
  11.2 Records (C++ Structs)    403
     Accessing Individual Components    405
     Aggregate O

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) m.ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號(hào) 鄂公網(wǎng)安備 42010302001612號(hào)