| |
| |
| |
Introduction to Computers and Programming | |
| |
| |
| |
Why Program? | |
| |
| |
| |
Computer Systems: Hardware and Software | |
| |
| |
| |
Programs and Programming Languages | |
| |
| |
| |
What Is a Program Made of? | |
| |
| |
| |
Input, Processing, and Output | |
| |
| |
| |
The Programming Process | |
| |
| |
| |
Procedural and Object-Oriented Programming Review Questions and Exercises | |
| |
| |
| |
Introduction to C++ | |
| |
| |
| |
The Parts of a C++ Program | |
| |
| |
| |
The cout Object | |
| |
| |
| |
The #include Directive | |
| |
| |
| |
Variables and Literals | |
| |
| |
| |
Identifiers | |
| |
| |
| |
Integer Data Type | |
| |
| |
| |
The char Data Type | |
| |
| |
| |
Floating-Point Data Type | |
| |
| |
| |
The bool Data Type | |
| |
| |
| |
Determining the Size of a Data Type | |
| |
| |
| |
Variable Assignments and Initialization | |
| |
| |
| |
Scope | |
| |
| |
| |
Arithmetic Operators | |
| |
| |
| |
Comments | |
| |
| |
| |
Focus on Software Engineering: Programming Style | |
| |
| |
| |
If You Plan to Continue in Computer Science: Standard and Prestandard C++ Review Questions and Exercises | |
| |
| |
| |
Expressions and Interactivity | |
| |
| |
| |
The cin Object | |
| |
| |
| |
Mathematical Expressions | |
| |
| |
| |
When You Mix Apples and Oranges: Type Conversion | |
| |
| |
| |
Overflow and Underflow | |
| |
| |
| |
Type Casting | |
| |
| |
| |
Named Constants | |
| |
| |
| |
Multiple Assignments and Combined Assignment | |
| |
| |
| |
Formatting Output | |
| |
| |
| |
Formatted Input | |
| |
| |
| |
Focus on Object-Oriented Programming: More About Member Functions | |
| |
| |
| |
More Mathematical Library Functions | |
| |
| |
| |
Introduction to File Input and Output Review Questions and Exercises Focus on Problem Solving: A Case Study (on CD) | |
| |
| |
| |
Making Decisions | |
| |
| |
| |
Relational Operators | |
| |
| |
| |
The if Statement | |
| |
| |
| |
Flags | |
| |
| |
| |
Expanding the if Statement | |
| |
| |
| |
The if/else Statement | |
| |
| |
| |
The if/else if Statement | |
| |
| |
| |
Using a Trailing else | |
| |
| |
| |
Menus | |
| |
| |
| |
Focus on Software Engineering: Nested if Statements | |
| |
| |
| |
Logical Operators | |
| |
| |
| |
Checking Numeric Ranges with Logical Operators | |
| |
| |
| |
Focus on Software Engineering: Validating User Input | |
| |
| |
| |
More About Variables Definitions and Scope | |
| |
| |
| |
Comparing Strings | |
| |
| |
| |
The Conditional Operator | |
| |
| |
| |
The switch Statement | |
| |
| |
| |
Testing for File Open Errors Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) | |
| |
| |
| |
Looping | |
| |
| |
| |
The Increment and Decrement Operators | |
| |
| |
| |
Introduction to Loops: The while loop | |
| |
| |
| |
Counters | |
| |
| |
| |
Letting the User Control the Loop | |
| |
| |
| |
Keeping a Running Total | |
| |
| |
| |
Sentinels | |
| |
| |
| |
Using a Loop to Read Data from a File | |
| |
| |
| |
The do-while and for Loops | |
| |
| |
| |
Focus on Software Engineering: Deciding Which Loop to Use | |
| |
| |
| |
Nested Loops | |
| |
| |
| |
Breaking Out of a Loop | |
| |
| |
| |
The continue Statement | |
| |
| |
| |
Focus on Software Engineering: Using Loops for Data Validation Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) | |
| |
| |
| |
Functions | |
| |
| |
| |
Focus on Software Engineering: Modular Programming | |
| |
| |
| |
Defining and Calling Functions | |
| |
| |
| |
Function Prototypes | |
| |
| |
| |
Sending Data Into a Function | |
| |
| |
| |
Passing Data by Value | |
| |
| |
| |
Focus on Software Engineering: Using Functions in a Menu-Driven Program | |
| |
| |
| |
The return Statement | |
| |
| |
| |
Returning a Value from a Function | |
| |
| |
| |
Returning a Boolean Value | |
| |
| |
| |
Local and Global Variables | |
| |
| |
| |
Static Local Variables | |
| |
| |
| |
Default Arguments | |
| |
| |
| |
Using Reference Variables as Parameters | |
| |
| |
| |
Overloading Functions | |
| |
| |
| |
the exit() Function | |
| |
| |
| |
Stubs and Drivers Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) | |
| |
| |
| |
Arrays | |
| |
| |
| |
Arrays Hold Multiple Values | |
| |
| |
| |
Accessing Array Elements | |
| |
| |
| |
No Bounds Checking in C++ | |
| |
| |
| |
Array Initialization | |
| |
| |
| |
Processing Array Contents | |
| |
| |
| |
Focus on Software Engineering: Using Parallel Arrays | |
| |
| |
| |
Arrays as Function Arguments | |
| |
| |
| |
Two-dimensional Arrays | |
| |
| |
| |
Arrays and Strings | |
| |
| |
| |
Arrays with Three or More Dimensions | |
| |
| |
| |
If You Plan to Continue in Computer Science: Introduction to the STL vector Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) Focus on Problem Solving and Program Design: A Case Study (on CD) | |
| |
| |
| |
Pointers | |
| |
| |
| |
Getting the Address of a Variable | |
| |
| |
| |
Pointer Variables | |
| |
| |
| |
The Relationship Between Arrays and Pointers | |
| |
| |
| |
Pointer Arithmetic | |
| |
| |
| |
Initializing Pointers | |
| |
| |
| |
Comparing Pointers | |
| |
| |
| |
Pointers as Function Parameters | |
| |
| |
| |
Focus on Software Engineering: Dynamic Memory Allocation | |
| |
| |
| |
Focus on Software Engineering: Returning Pointers from Functions Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) | |
| |
| |
| |
Characters, Strings, and the string Class | |
| |
| |
| |
Character Testing | |
| |
| |
| |
Character Case Conversion | |
| |
| |
| |
Review of the Internal Storage of C-Strings | |
| |
| |
| |
Library Functions for Working with C-Strings | |
| |
| |
| |
String/Numeric Conversion Functions | |
| |
| |
| |
Focus on Software Engineering: Writing Your Own C-String-Handling Functions | |
| |
| |
| |
The C++ string Class Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) Focus on Problem Solving and Program Design: A Case Study (on CD) | |
| |
| |
| |
Structured Data | |
| |
| |
| |
Abstract Data Types | |
| |
| |
| |
Focus on Software Engineering: Combining Data into Structures | |
| |
| |
| |
Accessing Structure Members | |
| |
| |
| |
Initializing a Structure | |
| |
| |
| |
Arrays of Structures | |
| |
| |
| |
Focus on Software Engineering: Nested Structures | |
| |
| |
| |
Structures as Function Arguments | |
| |
| |
| |
Returning a Structure from a Function | |
| |
| |
| |
Pointers to Structures | |
| |
| |
| |
Focus on Software Engineering: When to Use., When to Use ->, and When to Use | |
| |
| |
| |
Unions Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) | |
| |
| |
| |
Advanced File Operations | |
| |
| |
| |
File Operations | |
| |
| |
| |
File Output Formatting | |
| |
| |
| |
Passing File Stream Objects to Functions | |
| |
| |
| |
More Detailed Error Testing | |
| |
| |
| |
Member Functions for Reading and Writing Files | |
| |
| |
| |
Focus on Software Engineering: Working with Multiple Files | |
| |
| |
| |
Binary Files | |
| |
| |
| |
Creating Records with Structures | |
| |
| |
| |
Random-Access Files | |
| |
| |
| |
Opening a File for Both Input and Output Review Questions and Exercises Focus on Problem Solving and Program Design: A Case Study (on CD) | |
| |
| |
| |
Introduction to Classes | |
| |
| |
| |
Procedural and Object-Oriented Programming | |
| |
| |
| |
Introduction to Classes | |
| |
| |
| |
Defining an Instance of a Class | |
| |
| |
| |
Why Have Private Members? | |
| |
| |
| |
Focus on Software Engineering: Some Design Considerations | |
| |
| |
| |
Focus on Software Engineering: Using Private Member Functions | |
| |
| |
| |
Inline Member Functions | |
| |
| |
| |
Constructors | |
| |
| |
| |
Destructors | |
| |
| |
| |
Constructors That Accept Arguments | |
| |
| |
| |
Focus on Software Engineering: Input Validation Objects | |
| |
| |
| |
Overloading Constructors | |
| |
| |
| |
Only One Default Constructor and One Destructor | |
| |
| |
| |
Arrays of Objects | |
| |
| |
| |
Focus on Object-Oriented Programming: Creating an Abstract Array Data T | |