توضیحاتی در مورد کتاب Problem Solving, Abstraction, and Design Using C++
نام کتاب : Problem Solving, Abstraction, and Design Using C++
عنوان ترجمه شده به فارسی : حل مسئله، انتزاع و طراحی با استفاده از C
سری :
نویسندگان : Friedman. Frank L, Koffman. Elliot B
ناشر : Pearson
سال نشر : 2010
تعداد صفحات : 904
ISBN (شابک) : 1417137665 , 2220100033441
زبان کتاب : English
فرمت کتاب : pdf
حجم کتاب : 6 مگابایت
بعد از تکمیل فرایند پرداخت لینک دانلود کتاب ارائه خواهد شد. درصورت ثبت نام و ورود به حساب کاربری خود قادر خواهید بود لیست کتاب های خریداری شده را مشاهده فرمایید.
فهرست مطالب :
Cover......Page 1
Contents......Page 18
Chapter zero: Computer Science as a Career Path......Page 36
Chapter one: Introduction to Computers, Problem Solving, and Programming......Page 50
Early Computers......Page 51
Categories of Computers......Page 52
1.2 Computer Hardware......Page 53
Memory......Page 55
Main Memory......Page 56
Secondary Memory......Page 57
Input/Output Devices......Page 59
Computer Networks......Page 60
The World Wide Web......Page 62
Operating System......Page 63
Application Software......Page 65
Programming Languages......Page 66
Object-Oriented Programming......Page 67
1.4 Processing a High-Level Language Program......Page 70
Executing a Program......Page 72
1.5 The Software Development Method......Page 73
1.6 Applying the Software Development Method......Page 76
CASE STUDY: Converting Miles to Kilometers......Page 77
Computer Hacking......Page 80
Misuse of a Computer Resource......Page 81
Chapter Review......Page 82
Quick-Check Exercises......Page 83
Review Questions......Page 84
Answers to Quick-Check Exercises......Page 85
Bjarne Stroustrup......Page 86
Chapter two: Overview of C++......Page 88
Comments......Page 89
Compiler Directive #include......Page 90
Function main......Page 91
Declaration Statements......Page 92
Executable Statements......Page 93
Identifiers......Page 95
Uppercase and Lowercase Letters......Page 96
Data Types......Page 98
string Class......Page 101
Declarations......Page 102
Constant Declarations......Page 103
Assignment Statements......Page 106
Input Statements......Page 109
Program Output......Page 111
The return Statement......Page 113
2.5 General Form of a C++ Program......Page 115
Comments in Programs......Page 116
2.6 Arithmetic Expressions......Page 118
Operators / and %......Page 119
Mixed-Type Assignment Statement......Page 121
Expressions with Multiple Operators......Page 122
Writing Mathematical Formulas in C++......Page 126
CASE STUDY: Supermarket Coin Processor......Page 128
2.7 Interactive Mode, Batch Mode, and Data Files......Page 133
Output Redirection......Page 135
2.8 Common Programming Errors......Page 136
Syntax Errors......Page 137
Run-Time Errors......Page 138
Undetected Errors......Page 139
Logic Errors......Page 140
Chapter Review......Page 141
Quick-Check Exercises......Page 143
Review Questions......Page 144
Programming Projects......Page 145
Answers to Quick-Check Exercises......Page 148
Josée Lajoie......Page 150
Chapter three: Top-Down Design with Functions and Classes......Page 152
3.1 Building Programs from Existing Information......Page 153
CASE STUDY: Finding the Area and Circumference of a Circle......Page 154
CASE STUDY: Computing the Weight of a Batch of Flat Washers......Page 156
3.2 Library Functions......Page 161
C++ Library Functions......Page 163
A Look Ahead......Page 165
CASE STUDY: Drawing Simple Figures......Page 167
3.4 Functions without Arguments......Page 169
Function Definitions......Page 171
Order of Execution of Functions......Page 173
Advantages of Using Function Subprograms......Page 175
3.5 Functions with Input Arguments......Page 179
Functions with Input Arguments and a Single Result......Page 181
Functions with Multiple Arguments......Page 186
Argument/Parameter List Correspondence......Page 187
Testing Functions Using Drivers......Page 188
3.6 Scope of Names......Page 189
The string Class......Page 192
Reading and Displaying string Objects......Page 194
Dot Notation: Calling Functions length and at......Page 195
Member Functions for Word-Processing Operations......Page 196
Assigning a Substring to a string Object......Page 197
Composition of a Window......Page 199
Some Common Graphics Functions......Page 200
Background Color and Foreground Color......Page 202
Drawing Rectangles......Page 203
Drawing Circles, Ellipses, and Arcs......Page 204
Pie Slices and Filled Ellipses......Page 211
Adding Text to Drawings......Page 213
3.9 Common Programming Errors......Page 216
Separately Testing Function Subprograms......Page 218
Chapter Review......Page 219
Quick-Check Exercises......Page 220
Review Questions......Page 221
Programming Projects......Page 222
Graphics Projects......Page 226
Answers to Quick-Check Exercises......Page 227
Mark Hall......Page 229
Chapter four: Selection Structures: if and switch Statements......Page 232
4.2 Logical Expressions......Page 233
Logical Expressions Using Relational and Equality Operators......Page 234
Logical Expressions Using Logical Operators......Page 235
Operator Precedence......Page 237
Writing Conditions in C++......Page 239
Comparing Characters and Strings......Page 241
Boolean Assignment......Page 242
Using Integers to Represent Logical Values......Page 243
4.3 Introduction to the if Control Statement......Page 244
if Statement with Two Alternatives......Page 245
if Statement Conditions with Characters and Strings......Page 246
Format of the if Statement......Page 248
4.4 if Statements with Compound Alternatives......Page 250
Tracing an if Statement......Page 251
CASE STUDY: Payroll Problem with Functions......Page 254
Adding Data Flow Information to Structure Charts......Page 262
Commentary—The Software Development Method......Page 263
4.6 Checking the Correctness of an Algorithm......Page 264
4.7 Nested if Statements and Multiple-Alternative Decisions......Page 266
Writing a Nested if as a Multiple-Alternative Decision......Page 267
Order of Conditions......Page 269
Short-Circuit Evaluation of Logical Expressions......Page 272
4.8 The switch Control Statement......Page 274
Using a switch Statement to Select Alternative Functions......Page 277
4.9 Common Programming Errors......Page 279
Chapter Review......Page 280
Quick-Check Exercises......Page 283
Review Questions......Page 285
Programming Projects......Page 286
Answers to Quick-Check Exercises......Page 291
Chapter five: Repetition and Loop Statements......Page 294
5.1 Counting Loops and the while Statement......Page 295
The while Statement......Page 296
Syntax of the while Statement......Page 297
5.2 Accumulating a Sum or Product in a Loop......Page 300
Multiplying a List of Numbers......Page 303
Compound Assignment Operators......Page 304
5.3 The for Statement......Page 306
Increment and Decrement Operators......Page 308
Increments and Decrements Other than One......Page 310
Displaying a Table of Values......Page 311
5.4 Conditional Loops......Page 314
CASE STUDY: Monitoring Oil Supply......Page 315
Zero Iteration Loops......Page 317
More General Conditional Loops......Page 319
5.5 Loop Design and Loop Patterns......Page 321
Sentinel-Controlled Loops......Page 322
Calculating an Average......Page 325
Flag-Controlled Loops......Page 326
5.6 The do-while Statement......Page 328
5.7 Review of while, for, and do-while Loops......Page 334
5.8 Nested Loops......Page 336
Using a Debugger......Page 341
Debugging without a Debugger......Page 342
Off-by-One Errors......Page 343
5.10 Loops in Graphics Programs (Optional)......Page 344
Animation......Page 347
5.11 Common Programming Errors......Page 351
Chapter Review......Page 354
Quick-Check Exercises......Page 356
Review Questions......Page 357
Programming Projects......Page 359
Answers to Quick-Check Exercises......Page 365
Mike Weisert......Page 366
Chapter six: Modular Programming......Page 368
6.1 Value and Reference Parameters......Page 369
Call-by-Value and Call-by-Reference Parameters......Page 371
When to Use a Reference or a Value Parameter......Page 373
Protection Afforded by Value Parameters......Page 374
Argument/Parameter List Correspondence Revisited......Page 375
6.2 Functions with Output and Input Parameters......Page 379
6.3 Stepwise Design with Function......Page 386
CASE STUDY: General Sum and Average Problem......Page 387
Multiple Declarations of Identifiers in a Program......Page 394
6.4 Using Objects with Functions......Page 396
Top-Down Testing and Stubs......Page 398
Bottom-Up Testing and Drivers......Page 399
Debugging Tips for Program Systems......Page 400
Black-Box versus White-Box Testing......Page 401
6.6 Recursive Functions (Optional)......Page 403
6.7 Common Programming Errors......Page 406
Chapter Review......Page 407
Quick-Check Exercises......Page 409
Review Questions......Page 410
Programming Projects......Page 411
Answers to Quick-Check Exercises......Page 419
Robert Sebesta......Page 420
Chapter seven: Simple Data Types......Page 422
The #define Compiler Directive......Page 423
Fixed-Point and Floating-Point Data Types......Page 424
Integer Types......Page 425
Numerical Inaccuracies......Page 426
Type Conversions......Page 428
Type Casting......Page 429
7.3 Character Data and Functions......Page 431
Some Useful Character Functions......Page 432
Complementing Logical Expressions......Page 436
Input and Output of Type bool Data......Page 438
7.5 Enumeration Types......Page 440
Characters as Enumerator Values......Page 442
Reading and Writing Enumeration Type Values......Page 443
Enumeration Types as Cast Operators......Page 446
7.6 Iterative Approximations......Page 449
Function Parameters......Page 450
CASE STUDY: Bisection Method for Finding Roots......Page 451
7.7 Using Type char Data to Control a Graphics Program (Optional)......Page 457
Generating Random Numbers......Page 460
Seeding the Random Number Generator......Page 461
7.8 Common Programming Errors......Page 462
Chapter Review......Page 464
Quick-Check Exercises......Page 465
Review Questions......Page 466
Programming Projects......Page 467
Answers to Quick-Check Exercises......Page 476
8.1 The Standard Input/Output Streams......Page 478
Reading One Character at a Time......Page 483
Interactive versus Batch Processing......Page 487
Attaching Streams to External Files......Page 488
More on the Newline Character......Page 492
Using getline with a File Stream......Page 494
CASE STUDY: Preparing a Payroll File......Page 496
8.4 More on Reading String Data......Page 502
Using ignore to Advance Past the Newline Character......Page 503
8.5 Input/Output Manipulators......Page 505
8.6 Common Programming Errors......Page 508
Chapter Review......Page 509
Review Questions......Page 511
Programming Projects......Page 512
Answers to Quick-Check Exercises......Page 519
Anita Borg......Page 520
Chapter nine: Data Structures:Arrays and Structs......Page 522
Array Declaration......Page 523
Array Initialization......Page 526
Array Subscripts......Page 527
9.2 Sequential Access to Array Elements......Page 530
Strings and Arrays of Characters......Page 533
9.3 Array Arguments......Page 535
Array Elements as Arguments......Page 536
Passing an Array Argument......Page 537
9.4 Reading Part of an Array......Page 542
Finding the Smallest Value in an Array......Page 545
Array Search......Page 547
Sorting an Array in Ascending Order......Page 548
Analysis of a Search Algorithm......Page 552
Analysis of a Sort Algorithm......Page 553
Declaring Two-Dimensional Arrays......Page 555
Nested Loops for Processing Two-Dimensional Arrays......Page 557
Two-Dimensional Arrays as Function Arguments......Page 558
Arrays with Several Dimensions......Page 559
9.8 The Struct Data Type......Page 561
Declaring a Struct Type and Struct Variables......Page 562
Accessing Members of a Struct......Page 564
Passing a Struct as an Argument......Page 565
Reading a Struct......Page 567
Efficiency of Reference Arguments......Page 568
9.10 Arrays of Structs......Page 570
Declaring and Initializing an Array of Characters......Page 573
Reading and Writing Character Arrays......Page 574
Some Useful Functions for Character Arrays......Page 575
Drawing a Polygon......Page 577
Drawing a Grid......Page 579
9.13 Common Programming Errors......Page 584
Chapter Review......Page 586
Quick-Check Exercises......Page 587
Review Questions......Page 589
Programming Projects......Page 591
Answers to Quick-Check Exercises......Page 598
Chapter ten: User-Defined Classes......Page 600
The counter Class......Page 601
Class Definition for the counter Class......Page 602
Compiler Directives in File counter.h......Page 605
Using the counter Class......Page 606
Compiler Directives in File CounterTest.cpp......Page 607
10.2 Class Implementation......Page 608
Constructors......Page 610
Accessor and Modifier Functions......Page 611
Compiler Directives in File counter.cpp......Page 612
Public versus Private Access......Page 613
Syntax for Class and Member Function Definitions......Page 614
Project Files and Separate Compilation......Page 616
Function Overloading and Polymorphism......Page 617
10.4 Classes as Operands and Arguments......Page 618
Design of fraction Class......Page 620
Using Class fraction......Page 622
Implementation File for Class fraction......Page 624
Design of circle Class......Page 628
Using Class circle......Page 630
Implementation File for Class circle......Page 632
Design of Class simpleString......Page 634
Definition of Class simpleString......Page 635
Testing Member Functions of Class simpleString......Page 636
Implementation File for Class simpleString......Page 638
CASE STUDY: Using the Savings Account Class......Page 642
10.9 Common Programming Errors......Page 649
Chapter Review......Page 651
Quick-Check Exercises......Page 652
Review Questions......Page 653
Programming Projects......Page 654
Answers to Quick-Check Exercises......Page 658
Timothy Budd......Page 660
Chapter eleven: Data Abstraction and Object-Oriented Design......Page 662
Definition of a Template Class......Page 663
Implementation of a Template Class......Page 666
Compiler Instructions to Support Separate Compilation......Page 669
Need for an Indexed List Class......Page 670
Analysis and Design of an Indexed List Class......Page 671
Using the indexList Class......Page 674
11.3 Implementing the Indexed List Class......Page 677
CASE STUDY: An Address Book for an Email Provider......Page 684
Operator Overloading......Page 700
Friends......Page 702
11.6 The vector Class......Page 704
Vector Functions......Page 706
Accessing a Vector through an Iterator......Page 707
Standard Algorithms......Page 708
Using a vector in the Email Address Book Case Study......Page 709
11.7 Common Programming Errors......Page 713
Quick-Check Exercises......Page 715
Review Questions......Page 716
Programming Projects......Page 717
Answers to Quick-Check Exercises......Page 722
John Lakos......Page 724
Chapter twelve: Recursion......Page 726
12.1 The Nature of Recursion......Page 727
Properties of Recursive Problems and Solutions......Page 728
Tracing a Recursive Function......Page 730
Displaying Characters in Reverse Order......Page 731
Stack for Function Calls......Page 734
Implementation of Argument Stacks in C++......Page 736
12.3 Recursive Mathematical Functions......Page 737
12.4 Recursive Functions with Array Arguments......Page 743
CASE STUDY: Binary Search......Page 745
CASE STUDY: The Towers of Hanoi......Page 750
12.6 Common Programming Errors......Page 756
Review Questions......Page 758
Programming Projects......Page 759
Answers to Quick-Check Exercises......Page 761
Marshall Cline......Page 762
Chapter thirteen: Pointers and Dynamic Data Structures......Page 764
13.1 Pointers and the new Operator......Page 765
Accessing Data with Pointers......Page 766
Pointers with Arrays......Page 767
Pointers to Structs......Page 768
Effect of the new Operator on the Heap......Page 772
Returning Cells to the Heap......Page 773
Declaring Nodes......Page 774
Connecting Nodes......Page 775
Inserting a Node in a List......Page 776
Insertion at the Head of a List......Page 777
Insertion at the End of a List......Page 778
Traversing a List......Page 779
Circular Lists and Two-Way Lists (Optional)......Page 781
The list Class......Page 782
13.4 The Stack Abstract Data Type......Page 785
The C++ stack Class......Page 786
Implementing the Stack Operators......Page 790
Testing the Stack ADT......Page 793
13.5 The Queue Abstract Data Type......Page 795
Implementing a Queue ADT......Page 796
13.6 Binary Trees......Page 802
Searching a Binary Search Tree......Page 803
Building a Binary Search Tree......Page 805
Displaying a Binary Search Tree......Page 806
Design of Binary Tree Class......Page 808
Implementation of Binary Tree Class......Page 811
13.8 Efficiency of a Binary Search Tree......Page 816
Run-Time Errors......Page 818
Chapter Review......Page 819
Quick-Check Exercises......Page 820
Review Questions......Page 822
Programming Projects......Page 824
Answers to Quick-Check Exercises......Page 828
Chapter fourteen: Multiprocessing Using Processes and Threads......Page 830
Linear versus Parallel Programming......Page 831
Multitasking as Time Sharing......Page 832
Time Slices and Parallelism......Page 833
Concurrent Programming......Page 835
14.2 Processes......Page 836
Creating a Process......Page 837
Waiting for a Process......Page 839
Executing Another Program from a Process......Page 841
Pipes......Page 843
Using Pipes......Page 845
Interprocess Communications Using Standard Input......Page 847
Illustrating Communication between a Parent and a Child Process......Page 848
14.4 Threads......Page 852
Creating a Thread......Page 853
Thread Synchronization......Page 856
Mutual Exclusion Locking......Page 857
Deadlocks......Page 860
CASE STUDY: Threads Illustrated......Page 864
Chapter Review......Page 878
Review of C++ Constructs......Page 879
Quick-Check Exercises......Page 881
Programming Projects......Page 882
Answers to Quick-Check Exercises......Page 883
Index......Page 886
A......Page 887
C......Page 888
D......Page 890
E......Page 892
F......Page 893
H......Page 894
J......Page 895
L......Page 896
N......Page 897
P......Page 898
S......Page 900
T......Page 902
V......Page 903
Z......Page 904