Tony Gaddisβs accessible, step-by-step presentation helps beginning students understand the important details necessary to become skilled programmers at an introductory level. Gaddis motivates the study of both programming skills and the C++ programming language by presenting all the details needed
Starting out with C++. Early objects
β Scribed by Gaddis, Tony;Walters, Judy;Muganda, Godfrey
- Publisher
- Pearson
- Year
- 2016;2017
- Tongue
- English
- Leaves
- 1273
- Edition
- Ninth edition
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
For courses in C++ Programming.
Fundamentals of C++ for Novices and Experienced Programmers Alike
Intended for use in a two-term, three-term, or accelerated one-term C++ programming sequence, thisNinth EditionofStarting Out with C++: Early Objectsintroduces the fundamentals of C++ to novices and experienced programmers alike. In clear, easy-to-understand terms, the text introduces all of the necessary topics for beginning C++ programmers. Real-world examples allow readers to apply their knowledge in understanding how, why, and when to implement the features of C++. The text is organized in a progressive, step-by-step fashion that allows for flexibility. Building on the popularity of previous editions, theNinth Editionhas been updated and enhanced with new material, including C++11 topics and recent changes in technology.
β¦ Table of Contents
Cover......Page 1
Title Page......Page 4
Copyright Page......Page 5
Contents at a Glance......Page 6
Contents......Page 8
Preface......Page 16
Acknowledgments......Page 28
About the Authors......Page 31
Acknowledgments for the Global Edition......Page 32
1.1 Why Program?......Page 36
1.2 Computer Systems: Hardware and Software......Page 38
1.3 Programs and Programming Languages......Page 43
1.4 What Is a Program Made of?......Page 48
1.5 Input, Processing, and Output......Page 52
1.6 The Programming Process......Page 53
1.7 Tying It All Together: Hi! Itβs Me......Page 58
2.1 The Parts of a C++ Program......Page 62
2.2 The cout Object......Page 66
2.3 The # include Directive......Page 71
2.4 Variables and the Assignment Statement......Page 72
2.5 Literals......Page 74
2.6 Identifiers......Page 76
2.7 Integer Data Types......Page 78
2.8 Floating-Point Data Types......Page 83
2.9 The char Data Type......Page 87
2.10 The C++ string Class......Page 91
2.11 The bool Data Type......Page 92
2.12 Determining the Size of a Data Type......Page 93
2.13 More on Variable Assignments and Initialization......Page 94
2.14 Scope......Page 96
2.15 Arithmetic Operators......Page 97
2.16 Comments......Page 101
2.17 Programming Style......Page 102
2.18 Tying It All Together: Smile!......Page 104
3.1 The cin Object......Page 112
3.2 Mathematical Expressions......Page 119
3.3 Data Type Conversion and Type Casting......Page 127
3.4 Overflow and Underflow......Page 133
3.5 Named Constants......Page 134
3.6 Multiple and Combined Assignment......Page 137
3.7 Formatting Output......Page 141
3.8 Working with Characters and Strings......Page 151
3.9 More Mathematical Library Functions......Page 165
3.10 Random Numbers......Page 167
3.11 Focus on Debugging: Hand Tracing a Program......Page 171
3.12 Green Fields Landscaping Case StudyβPart 1......Page 173
3.13 Tying It All Together: Word Game......Page 176
4.1 Relational Operators......Page 190
4.2 The if Statement......Page 196
4.3 The if/else Statement......Page 205
4.4 The if/else if Statement......Page 210
4.5 Menu-Driven Programs......Page 218
4.6 Nested if Statements......Page 220
4.7 Logical Operators......Page 224
4.8 Validating User Input......Page 233
4.9 More about Blocks and Scope......Page 235
4.10 More about Characters and Strings......Page 238
4.11 The Conditional Operator......Page 244
4.12 The switch Statement......Page 248
4.13 Enumerated Data Types......Page 257
4.14 Focus on Testing and Debugging: Validating Output Results......Page 260
4.15 Green Fields Landscaping Case StudyβPart 2......Page 262
4.16 Tying It All Together: Fortune Teller......Page 267
5.1 Introduction to Loops: The while Loop......Page 278
5.2 Using the while Loop for Input Validation......Page 285
5.3 The Increment and Decrement Operators......Page 288
5.4 Counters......Page 293
5.5 Keeping a Running Total......Page 295
5.6 Sentinels......Page 298
5.7 The do-while Loop......Page 300
5.8 The for Loop......Page 306
5.9 Focus on Software Engineering: Deciding Which Loop to Use......Page 312
5.10 Nested Loops......Page 314
5.11 Breaking Out of a Loop......Page 316
5.12 Using Files for Data Storage......Page 320
5.13 Focus on Testing and Debugging: Creating Good Test Data......Page 336
5.14 Central Mountain Credit Union Case Study......Page 339
5.15 Tying It All Together: What a Colorful World......Page 343
6.1 Modular Programming......Page 358
6.2 Defining and Calling Functions......Page 359
6.3 Function Prototypes......Page 367
6.4 Sending Data into a Function......Page 368
6.5 Passing Data by Value......Page 373
6.6 The return Statement......Page 377
6.7 Returning a Value from a Function......Page 378
6.8 Returning a Boolean Value......Page 384
6.9 Using Functions in a Menu-Driven Program......Page 386
6.10 Local and Global Variables......Page 390
6.11 Static Local Variables......Page 397
6.12 Default Arguments......Page 399
6.13 Using Reference Variables as Parameters......Page 403
6.14 Overloading Functions......Page 413
6.15 The exit() Function......Page 417
6.16 Stubs and Drivers......Page 420
6.17 Little Lotto Case Study......Page 422
6.18 Tying It All Together: Glowing Jack-o-lantern......Page 427
7.1 Abstract Data Types......Page 442
7.2 Object-Oriented Programming......Page 444
7.3 Introduction to Classes......Page 446
7.4 Creating and Using Objects......Page 449
7.5 Defining Member Functions......Page 451
7.6 Constructors......Page 458
7.7 Destructors......Page 464
7.8 Private Member Functions......Page 467
7.9 Passing Objects to Functions......Page 470
7.10 Object Composition......Page 477
7.11 Focus on Software Engineering: Separating Class Specification, Implementation, and Client Code......Page 481
7.12 Structures......Page 488
7.13 More about Enumerated Data Types......Page 500
7.14 Home Software Company OOP Case Study......Page 504
7.15 Introduction to Object-Oriented Analysis and Design......Page 511
7.16 Screen Control......Page 521
7.17 Tying It All Together: Yoyo Animation......Page 526
8.1 Arrays Hold Multiple Values......Page 542
8.2 Accessing Array Elements......Page 544
8.3 Inputting and Displaying Array Data......Page 546
8.4 Array Initialization......Page 553
8.5 The Range-Based for loop......Page 560
8.6 Processing Array Contents......Page 563
8.7 Using Parallel Arrays......Page 574
8.9 Arrays as Function Arguments......Page 578
8.10 Two-Dimensional Arrays......Page 588
8.11 Arrays with Three or More Dimensions......Page 595
8.12 Vectors......Page 598
8.13 Arrays of Objects......Page 610
8.14 National Commerce Bank Case Study......Page 620
8.15 Tying It All Together: Rock, Paper, Scissors......Page 622
9.1 Introduction to Search Algorithms......Page 638
9.2 Searching an Array of Objects......Page 645
9.3 Introduction to Sorting Algorithms......Page 648
9.4 Sorting an Array of Objects......Page 656
9.5 Sorting and Searching Vectors......Page 659
9.6 Introduction to Analysis of Algorithms......Page 662
9.8 Tying It All Together: Secret Messages......Page 670
10.1 Pointers and the Address Operator......Page 680
10.2 Pointer Variables......Page 682
10.3 The Relationship Between Arrays and Pointers......Page 686
10.4 Pointer Arithmetic......Page 690
10.5 Initializing Pointers......Page 691
10.6 Comparing Pointers......Page 694
10.7 Pointers as Function Parameters......Page 696
10.8 Pointers to Constants and Constant Pointers......Page 700
10.9 Focus on Software Engineering: Dynamic Memory Allocation......Page 705
10.10 Focus on Software Engineering: Returning Pointers from Functions......Page 709
10.11 Pointers to Class Objects and Structures......Page 715
10.12 Focus on Software Engineering: Selecting Members of Objects......Page 719
10.13 Smart Pointers......Page 721
10.14 Tying It All Together: Pardon Me, Do You Have the Time?......Page 729
11.1 The this Pointer and Constant Member Functions......Page 738
11.2 Static Members......Page 743
11.3 Friends of Classes......Page 750
11.4 Memberwise Assignment......Page 755
11.5 Copy Constructors......Page 756
11.6 Operator Overloading......Page 765
11.7 Rvalue References and Move Operations......Page 786
11.8 Function Objects and Lambda Expressions......Page 796
11.9 Type Conversion Operators......Page 805
11.10 Convert Constructors......Page 808
11.11 Aggregation and Composition......Page 811
11.12 Inheritance......Page 817
11.13 Protected Members and Class Access......Page 822
11.14 Constructors, Destructors, and Inheritance......Page 827
11.15 Overriding Base Class Functions......Page 832
11.16 Tying It All Together: Putting Data on the World Wide Web......Page 835
12.1 C-Strings......Page 850
12.2 Library Functions for Working with C-Strings......Page 855
12.3 Conversions Between Numbers and Strings......Page 864
12.4 Writing Your Own C-String Handling Functions......Page 868
12.5 More about the C++ string Class......Page 874
12.6 Advanced Software Enterprises Case Study......Page 877
12.7 Tying It All Together: Program Execution Environments......Page 879
13.1 Input and Output Streams......Page 888
13.2 More Detailed Error Testing......Page 896
13.3 Member Functions for Reading and Writing Files......Page 900
13.4 Binary Files......Page 912
13.5 Creating Records with Structures......Page 916
13.6 Random-Access Files......Page 921
13.7 Opening a File for Both Input and Output......Page 928
13.8 Online Friendship Connections Case Study: Object Serialization......Page 933
13.9 Tying It All Together: File Merging and Color-Coded HTML......Page 938
14.1 Introduction to Recursion......Page 950
14.2 The Recursive Factorial Function......Page 957
14.3 The Recursive gcd Function......Page 959
14.4 Solving Recursively Defined Problems......Page 960
14.5 A Recursive Binary Search Function......Page 962
14.6 Focus on Problem Solving and Program Design: The QuickSort Algorithm......Page 964
14.7 The Towers of Hanoi......Page 968
14.8 Focus on Problem Solving: Exhaustive and Enumeration Algorithms......Page 971
14.9 Focus on Software Engineering: Recursion versus Iteration......Page 975
14.10 Tying It All Together: Infix and Prefix Expressions......Page 976
15.1 Type Compatibility in Inheritance Hierarchies......Page 984
15.2 Polymorphism and Virtual Member Functions......Page 990
15.3 Abstract Base Classes and Pure Virtual Functions......Page 998
15.4 Focus on Object-Oriented Programming: Composition versus Inheritance......Page 1004
15.5 Secure Encryption Systems, Inc., Case Study......Page 1008
15.6 Tying It All Together: Letβs Move It......Page 1011
16.1 Exceptions......Page 1022
16.2 Function Templates......Page 1034
16.3 Class Templates......Page 1042
16.4 Class Templates and Inheritance......Page 1047
16.5 Introduction to the Standard Template Library......Page 1051
16.6 Tying It All Together: Word Transformers Game......Page 1064
17.1 Introduction to the Linked List ADT......Page 1072
17.2 Linked List Operations......Page 1078
17.3 A Linked List Template......Page 1090
17.4 Recursive Linked List Operations......Page 1094
17.5 Variations of the Linked List......Page 1102
17.6 The STL list Container......Page 1103
17.7 Reliable Software Systems, Inc., Case Study......Page 1106
17.8 Tying It All Together: More on Graphics and Animation......Page 1109
18.1 Introduction to the Stack ADT......Page 1120
18.2 Dynamic Stacks......Page 1128
18.3 The STL stack Container......Page 1132
18.4 Introduction to the Queue ADT......Page 1134
18.5 Dynamic Queues......Page 1141
18.6 The STL deque and queue Containers......Page 1144
18.7 Focus on Problem Solving and Program Design: Eliminating Recursion......Page 1147
18.8 Tying It All Together: Converting Postfix Expressions to Infix......Page 1152
19.1 Definition and Applications of Binary Trees......Page 1160
19.2 Binary Search Tree Operations......Page 1164
19.4 Tying It All Together: Genealogy Trees......Page 1180
Appendix A: The ASCII Character Set......Page 1190
Appendix B: Operator Precedence and Associativity......Page 1194
Appendix C: Answers to Checkpoints......Page 1196
Appendix D: Answers to Odd-Numbered Review Questions......Page 1236
A......Page 1256
B......Page 1257
C......Page 1258
E......Page 1260
F......Page 1261
G......Page 1262
I......Page 1263
L......Page 1264
N......Page 1265
O......Page 1266
P......Page 1267
Q......Page 1268
S......Page 1269
T......Page 1271
V......Page 1272
W......Page 1273
β¦ Subjects
Textbooks;Computer Science;Programming;Reference;Nonfiction
π SIMILAR VOLUMES
Tony Gaddisβs accessible, step-by-step presentation helps beginning students understand the important details necessary to become skilled programmers at an introductory level. Gaddis motivates the study of both programming skills and the C++ programming language by presenting all the details needed
Starting Out With C++: Early Objects is intended for either a one semester traditional introductory programming course or a two-semester C++ programming sequence, with introductory material placed in the first half of the text and more advanced topics, such as recursion and data structures, placed i
<i>For courses in C++ Programming.</i><br /><br /><b>Fundamentals of C++ for Novices and Experienced Programmers Alike</b><br /><br />Intended for use in a two-term, three-term, or accelerated one-term C++ programming sequence, this <b>Ninth Edition</b> of <b> <i>Starting Out with C++: Early Obje