In Starting Out with C++: From Control Structures through Objects, Brief Edition, 7e, Gaddis takes a problem-solving approach, inspiring students to understand the logic behind developing quality programs while introducing the C++ programming language. This style of teaching builds programming confidence and enhances each student's development of programming skills. This edition in the Starting Out Series covers the core programming concepts that are introduced in the first semester introductory programming course. As with all Gaddis texts, clear and easy-to-read code listings, concise and practical real-world examples, and an abundance of exercises appear in every chapter. This book includes the first 15 chapters from the best-selling Starting Out with C++: From Control Structures through Objects, and covers the core programming concepts that are introduced in the first semester introductory programming course. MyProgrammingLab for Starting Out with C++ is a total learning package. MyProgrammingLab is an online homework, tutorial, and assessment program that truly engages students in learning. It helps students better prepare for class, quizzes, and exams-resulting in better performance in the course-and provides educators a dynamic set of tools for gauging individual and class progress. And, MyProgrammingLab comes from Pearson, your partner in providing the best digital learning experiences.
Les mer
Preface xviiCHAPTER 1 Introduction to Computers and Programming 11.1 Why Program? 11.2 Computer Systems: Hardware and Software 31.3 Programs and Programming Languages 81.4 What is a Program Made of? 131.5 Input, Processing, and Output 171.6 The Programming Process 181.7 Procedural and Object-Oriented Programming 22CHAPTER 2 Introduction to C++ 272.1 The Parts of a C++ Program 272.2 The cout Object 312.3 The #include Directive 362.4 Variables and Literals 372.5 Identifiers 412.6 Integer Data Types 422.7 The char Data Type 472.8 The C++ string Class 512.9 Floating-Point Data Types 532.10 The bool Data Type 562.11 Determining the Size of a Data Type 572.12 Variable Assignments and Initialization 582.13 Scope 592.14 Arithmetic Operators 602.15 Comments 682.16 Named Constants 702.17 Programming Style 722.18 If You Plan to Continue in Computer Science: Standard and Prestandard C++ 74CHAPTER 3 Expressions and Interactivity 853.1 The cin Object 853.2 Mathematical Expressions 913.3 When You Mix Apples and Oranges: Type Conversion 1003.4 Overflow and Underflow 1023.5 Type Casting 1033.6 Multiple Assignment and Combined Assignment 1073.7 Formatting Output 1113.8 Working with Characters and string Objects 1203.9 More Mathematical Library Functions 1273.10 Focus on Debugging: Hand Tracing a Program 1303.11 Focus on Problem Solving: A Case Study 132CHAPTER 4 Making Decisions 1494.1 Relational Operators 1494.2 The if Statement 1544.3 Expanding the if Statement 1624.4 The if/else Statement 1664.5 Nested if Statements 1694.6 The if/else if Statement 1764.7 Flags 1814.8 Logical Operators 1824.9 Checking Numeric Ranges with Logical Operators 1894.10 Menus 1904.11 Focus on Software Engineering: Validating User Input 1934.12 Comparing Characters and Strings 1954.13 The Conditional Operator 1994.14 The switch Statement 2024.15 More About Blocks and Scope 211CHAPTER 5 Loops and Files 2275.1 The Increment and Decrement Operators 2275.2 Introduction to Loops: The while Loop 2325.3 Using the while Loop for Input Validation 2395.4 Counters 2415.5 The do-while Loop 2425.6 The for Loop 2475.7 Keeping a Running Total 2575.8 Sentinels 2605.9 Focus on Software Engineering: Deciding Which Loop to Use 2615.10 Nested Loops 2625.11 Using Files for Data Storage 2655.12 Optional Topics: Breaking and Continuing a Loop 285CHAPTER 6 Functions 3016.1 Focus on Software Engineering: Modular Programming 3016.2 Defining and Calling Functions 3036.3 Function Prototypes 3116.4 Sending Data into a Function 3136.5 Passing Data by Value 3186.6 Focus on Software Engineering: Using Functions in a Menu-Driven Program 3206.7 The return Statement 3246.8 Returning a Value from a Function 3266.9 Returning a Boolean Value 3346.10 Local and Global Variables 3366.11 Static Local Variables 3446.12 Default Arguments 3476.13 Using Reference Variables as Parameters 3506.14 Overloading Functions 3566.15 The exit() Function 3606.16 Stubs and Drivers 363CHAPTER 7 Arrays 3777.1 Arrays Hold Multiple Values 3777.2 Accessing Array Elements 3797.3 No Bounds Checking in C++ 3867.4 Array Initialization 3897.5 Processing Array Contents 3947.6 Focus on Software Engineering: Using Parallel Arrays 4027.7 Arrays as Function Arguments 4057.8 Two-Dimensional Arrays 4167.9 Arrays with Three or More Dimensions 4237.10 Focus on Problem Solving and Program Design: A Case Study 4247.11 If You Plan to Continue in Computer Science: Introduction to the STL vector 427CHAPTER 8 Searching and Sorting Arrays 4518.1 Focus on Software Engineering: Introduction to Search Algorithms 4518.2 Focus on Problem Solving and Program Design: A Case Study 4588.3 Focus on Software Engineering: Introduction to Sorting Algorithms 4648.4 Focus on Problem Solving and Program Design: A Case Study 4728.5 If You Plan to Continue in Computer Science: Sorting and Searching vectors 480CHAPTER 9 Pointers 4919.1 Getting the Address of a Variable 4919.2 Pointer Variables 4939.3 The Relationship Between Arrays and Pointers 5009.4 Pointer Arithmetic 5049.5 Initializing Pointers 5069.6 Comparing Pointers 5079.7 Pointers as Function Parameters 5099.8 Focus on Software Engineering: Dynamic Memory Allocation 5189.9 Focus on Software Engineering: Returning Pointers from Functions 5229.10 Focus on Problem Solving and Program Design: A Case Study 529CHAPTER 10 Characters, C-Strings, and More About the string Class 54110.1 Character Testing 54110.2 Character Case Conversion 54510.3 C-Strings 54810.4 Library Functions for Working with C-Strings 55210.5 C-String/Numeric Conversion Functions 56310.6 Focus on Software Engineering: Writing Your Own C-String-Handling Functions 56810.7 More About the C++ string Class 57410.8 Focus on Problem Solving and Program Design: A Case Study 584CHAPTER 11 Structured Data 59311.1 Abstract Data Types 59311.2 Focus on Software Engineering: Combining Data into Structures 59511.3 Accessing Structure Members 59811.4 Initializing a Structure 60211.5 Arrays of Structures 60511.6 Focus on Software Engineering: Nested Structures 60811.7 Structures as Function Arguments 61211.8 Returning a Structure from a Function 61511.9 Pointers to Structures 61811.10 Focus on Software Engineering: When to Use ., When to Use ->, and When to Use * 62111.11 Unions 62311.12 Enumerated Data Types 627CHAPTER 12 Advanced File Operations 65112.1 File Operations 65112.2 File Output Formatting 65812.3 Passing File Stream Objects to Functions 66012.4 More Detailed Error Testing 66212.5 Member Functions for Reading and Writing Files 66512.6 Focus on Software Engineering: Working with Multiple Files 67212.7 Binary Files 67412.8 Creating Records with Structures 67912.9 Random-Access Files 68312.10 Opening a File for Both Input and Output 691CHAPTER 13 Introduction to Classes 70513.1 Procedural and Object-Oriented Programming 70513.2 Introduction to Classes 71213.3 Defining an Instance of a Class 71713.4 Why Have Private Members? 72813.5 Focus on Software Engineering: Separating Class Specification from Implementation 72913.6 Inline Member Functions 73513.7 Constructors 73813.8 Passing Arguments to Constructors 74213.9 Destructors 75013.10 Overloading Constructors 75413.11 Private Member Functions 75813.12 Arrays of Objects 75913.13 Focus on Problem Solving and Program Design: An OOP Case Study 76313.14 Focus on Object-Oriented Programming: Creating an Abstract Array Data Type 77013.15 Focus on Object-Oriented Design: The Unified Modeling Language (UML) 77413.16 Focus on Object-Oriented Design: Finding the Classes and Their Responsibilities 777CHAPTER 14 More About Classes 79914.1 Instance and Static Members 79914.2 Friends of Classes 80714.3 Memberwise Assignment 81214.4 Copy Constructors 81314.5 Operator Overloading 81914.6 Object Conversion 84614.7 Aggregation 84914.8 Focus on Object-Oriented Design: Class Collaborations 853CHAPTER 15 Inheritance, Polymorphism, and Virtual Functions 86915.1 What Is Inheritance? 86915.2 Protected Members and Class Access 87815.3 Constructors and Destructors in Base and Derived Classes 88415.4 Redefining Base Class Functions 89615.5 Class Hierarchies 90115.6 Polymorphism and Virtual Member Functions 90715.7 Abstract Base Classes and Pure Virtual Functions 92115.8 Multiple Inheritance 928Appendix A: Getting Started with Alice 947Appendix B: The ASCII Character Set 975Appendix C: Operator Precedence and Associativity 977Quick References 979Index 981Online: The following appendices are available at www.pearsonhighered.com/gaddis.Appendix D: Introduction to FlowchartingAppendix E: Using UML in Class DesignAppendix F: NamespacesAppendix G: Writing Managed C++ Code for the .NET FrameworkAppendix H: Passing Command Line ArgumentsAppendix I: Header File and Library Function ReferenceAppendix J: Binary Numbers and Bitwise OperationsAppendix K: Multi-Source File ProgramsAppendix L: Stream Member Functions for FormattingAppendix M: Introduction to Microsoft Visual C++ 2010 Express EditionAppendix N: Answers to CheckpointsAppendix O: Solutions to Odd-Numbered Review Questions CoursesCS0108C++ Programming (Computer Science)CS0108C++ Programming (Computer Science)CS0108C++ Programming (Computer Science)CS0108C++ Programming (Computer Science)CS0108C++ Programming (Computer Science)CS0108C++ Programming (Computer Science)CS0108C++ Programming (Computer Science)CS0108C++--Intro to Programming/CS1 (Computer Science)
Les mer

Produktdetaljer

ISBN
9781292058467
Publisert
2014-09-12
Utgave
7. utgave
Utgiver
Vendor
Pearson Education Limited
Aldersnivå
05, U
Språk
Product language
Engelsk
Format
Product format
Kombinasjonsprodukt

Forfatter