| |
| |
Preface | |
| |
| |
| |
Introduction to Computing and Engineering | |
| |
| |
Problem Solving | |
| |
| |
| |
Historical Perspective | |
| |
| |
| |
Recent Engineering Achievements | |
| |
| |
Changing Engineering Environment | |
| |
| |
| |
Computing Systems | |
| |
| |
Computer Hardware | |
| |
| |
Computer Software | |
| |
| |
| |
Data Representation and Storage | |
| |
| |
Number Systems | |
| |
| |
Data Types and Storage | |
| |
| |
| |
An Engineering Problem-Solving Methodology | |
| |
| |
Summary | |
| |
| |
| |
Simple C++ Programs | |
| |
| |
Engineering Challenge: Vehicle Performance | |
| |
| |
| |
Program Structure | |
| |
| |
| |
Constants and Variables | |
| |
| |
Scientific Notation | |
| |
| |
Numeric Data Types | |
| |
| |
Boolean Data Type | |
| |
| |
Character Data Type | |
| |
| |
String Data | |
| |
| |
Symbolic Constants | |
| |
| |
| |
C++ Classes | |
| |
| |
Class Declaration | |
| |
| |
Class Implementation | |
| |
| |
| |
C++ Operators | |
| |
| |
Assignment Operator | |
| |
| |
Arithmetic Operators | |
| |
| |
Precedence of Operators | |
| |
| |
Overflow and Underflow | |
| |
| |
Increment and Decrement Operators | |
| |
| |
Abbreviated Assignment Operators | |
| |
| |
| |
Standard Input and Output | |
| |
| |
The cout Object | |
| |
| |
Stream Objects | |
| |
| |
Manipulators | |
| |
| |
The cin Object | |
| |
| |
| |
Building C++ Solutions with IDEs: NetBeans | |
| |
| |
NetBeans | |
| |
| |
| |
Basic Functions Included in the C++ Standard Library | |
| |
| |
Elementary Math Functions | |
| |
| |
Trigonometric Functions | |
| |
| |
Hyperbolic Functions* | |
| |
| |
Character Functions | |
| |
| |
| |
Problem Solving Applied: Velocity Computation | |
| |
| |
| |
System Limitations | |
| |
| |
Summary | |
| |
| |
| |
Control Structures: Selection | |
| |
| |
Engineering Challenge: Global Change | |
| |
| |
| |
Algorithm Development | |
| |
| |
Top-Down Design | |
| |
| |
| |
Structured Programming | |
| |
| |
Pseudocode | |
| |
| |
Evaluation of Alternative Solutions | |
| |
| |
| |
Conditional Expressions | |
| |
| |
Relational Operators | |
| |
| |
Logical Operators | |
| |
| |
Precedence and Associativity | |
| |
| |
| |
Selection Statements: if Statement | |
| |
| |
Simple if Statements | |
| |
| |
if/else Statement | |
| |
| |
| |
Numerical Technique: Linear Interpolation | |
| |
| |
| |
Problem Solving Applied: Freezing Temperature of Seawater | |
| |
| |
| |
Selection Statements: switch Statement | |
| |
| |
| |
Building C++ Solutions with IDEs: NetBeans | |
| |
| |
NetBeans | |
| |
| |
| |
Defining Operators for Programmer-Defined Data Types | |
| |
| |
Summary | |
| |
| |
| |
Control Structures: Repetition | |
| |
| |
Engineering Challenge: Data Collection | |
| |
| |
| |
Algorithm Development | |
| |
| |
Pseudocode and Flowchart Description | |
| |
| |
| |
Repetition Structures | |
| |
| |
while Loop | |
| |
| |
do/while Loop | |
| |
| |
for Loop | |
| |
| |
| |
Problem Solving Applied: GPS | |
| |
| |
| |
break and continue Statements | |
| |
| |
| |
Structuring Input Loops | |
| |
| |
Counter-Controlled Loops | |
| |
| |
Sentinel-Controlled Loop | |
| |
| |
End-Of-Data Loop | |
| |
| |
| |
Problem Solving Applied: Weather Balloons | |
| |
| |
| |
Building C++ Solutions with IDEs: Microsoft Visual C++ | |
| |
| |
Microsoft Visual C++ | |
| |
| |
Summary | |
| |
| |
| |
Working with Data Files | |
| |
| |
Engineering Challenge: Weather Prediction | |
| |
| |
| |
Defining File Streams | |
| |
| |
Stream Class Hierarchy | |
| |
| |
ifstream Class | |
| |
| |
ofstream Class | |
| |
| |
| |
Reading Data Files | |
| |
| |
Specified Number of Records | |
| |
| |
Trailer or Sentinel Signals | |
| |
| |
End-of-File | |
| |
| |
| |
Generating a Data File | |
| |
| |
| |
Problem Solving Applied: Data Filters-Modifying an HTML File | |
| |
| |
| |
Error Checking | |
| |
| |
The Stream State | |
| |
| |
| |
Numerical Technique: Linear Modeling | |
| |
| |
| |
Problem Solving Applied: Ozone Measurements | |
| |
| |
Summary | |
| |
| |
| |
Modular Programming with Functions | |
| |
| |
Engineering Challenge: Simulation | |
| |
| |
| |
Modularity | |
| |
| |
| |
Programmer-Defined Functions | |
| |
| |
Function Definition | |
| |
| |
Solution 1 | |
| |
| |
Solution 2 | |
| |
| |
Function Prototype | |
| |
| |
| |
Parameter Passing | |
| |
| |
Pass by Value | |
| |
| |
Pass by Reference | |
| |
| |
Storage Class and Scope | |
| |
| |
| |
Problem Solving Applied: Calculating a Center of Gravity | |
| |
| |
| |
Random Numbers | |
| |
| |
Integer Sequences | |
| |
| |
Floating-Point Sequences | |
| |
| |
| |
Problem Solving Applied: Instrumentation Reliability | |
| |
| |
| |
Defining Class Methods | |
| |
| |
Public Interface | |
| |
| |
Accessor Methods | |
| |
| |
Mutator Methods | |
| |
| |
| |
Problem Solving Applied: Design of Composite Materials | |
| |
| |
Solution 1 | |
| |
| |
Solution 2 | |
| |
| |
| |
Numerical Technique: Roots of Polynomials* | |
| |
| |
Polynomial Roots | |
| |
| |
Incremental-Search Technique | |
| |
| |
| |
Problem Solving Applied: System Stability* | |
| |
| |
Newton-Raphson Method* | |
| |
| |
| |
Numerical Technique: Integration* | |
| |
| |
Integration Using the Trapezoidal Rule | |
| |
| |
Summary | |
| |
| |
| |
One-Dimensional Arrays | |
| |
| |
Engineering Challenge: Tsunami Warning Systems | |
| |
| |
| |
Arrays | |
| |
| |
Definition and Initialization | |
| |
| |
Pseudocode | |
| |
| |
Computation and Output | |
| |
| |
Function Arguments | |
| |
| |
| |
Problem Solving Applied: Hurricane Categories | |
| |
| |
| |
Statistical Measurements | |
| |
| |
Simple Analysis | |
| |
| |
Variance and Standard Deviation | |
| |
| |
Custom Header Files | |
| |
| |
| |
Problem Solving Applied: Speech Signal Analysis | |
| |
| |
| |
Sorting and Searching Algorithms | |
| |
| |
Selection Sort | |
| |
| |
Search Algorithms | |
| |
| |
Unordered Lists | |
| |
| |
Ordered Lists | |
| |
| |
| |
Problem Solving Applied: Tsunami Warning Systems | |
| |
| |
| |
Character Strings | |
| |
| |
C Style String Definition and I/O | |
| |
| |
String Functions | |
| |
| |
| |
The string Class | |
| |
| |
| |
The vector class | |
| |
| |
Parameter Passing | |
| |
| |
| |
Problem Solving Applied: Calculating Probabilities | |
| |
| |
Summary | |
| |
| |
| |
Two-Dimensional Arrays | |
| |
| |
Engineering Challenge: Terrain Navigation | |
| |
| |
| |
Two-Dimensional Arrays | |
| |
| |
Declaration and Initialization | |
| |
| |
Computations and Output | |
| |
| |
Function Arguments | |
| |
| |
| |
Problem Solving Applied: Terrain Navigation | |
| |
| |
| |
Two-Dimensional Arrays and the vector class | |
| |
| |
Function Arguments | |
| |
| |
| |
Matrices | |
| |
| |
Determinant | |
| |
| |
Transpose | |
| |
| |
Matrix Addition and Subtraction | |
| |
| |
Matrix Multiplication | |
| |
| |
| |
Numerical Technique: Solution to Simultaneous Equations | |
| |
| |
Graphical Interpretation | |
| |
| |
Gauss Elimination | |
| |
| |
| |
Problem Solving Applied: Electrical Circuit Analysis | |
| |
| |
| |
Higher Dimensional Arrays | |
| |
| |
Summary | |
| |
| |
| |
An Introduction to Pointers | |
| |
| |
Engineering Challenge: Weather Patterns | |
| |
| |
| |
Addresses and Pointers | |
| |
| |
Address Operator | |
| |
| |
Pointer Assignment | |
| |
| |
Pointer Arithmetic | |
| |
| |
| |
Pointers to Array Elements | |
| |
| |
One-Dimensional Arrays | |
| |
| |
Character Strings | |
| |
| |
Pointers as Function Arguments | |
| |
| |
| |
Problem Solving Applied: El Ni∼no-Southern Oscillation Data | |
| |
| |
| |
Dynamic Memory Allocation | |
| |
| |
The new Operator | |
| |
| |
Dynamically Allocated Arrays | |
| |
| |
The delete Operator | |
| |
| |
| |
Problem Solving Applied: Seismic Event Detection | |
| |
| |
| |
Common Errors Using new and delete | |
| |
| |
| |
Linked Data Structures | |
| |
| |
Linked Lists | |
| |
| |
Stacks | |
| |
| |
Queue | |
| |
| |
| |
The C++ Standard Template Library | |
| |
| |
The list class | |
| |
| |
The stack class | |
| |
| |
The queue class | |
| |
| |
| |
Problem Solving Applied: Concordance of a Text File | |
| |
| |
Summary | |
| |
| |
| |
Advanced Topics | |
| |
| |
Engineering Challenge: Artificial Intelligence | |
| |
| |
| |
Generic Programming | |
| |
| |
Function Templates | |
| |
| |
| |
Data Abstraction | |
| |
| |
Overloading Operators | |
| |
| |
The Pixel class | |
| |
| |
Arithmetic Operators | |
| |
| |
friend Functions | |
| |
| |
Validating Objects | |
| |
| |
Bitwise Operators | |
| |
| |
| |
Problem Solving Applied: Color Image Processing | |
| |
| |
| |
Recursion | |
| |
| |
Factorial Function | |
| |
| |
Fibonacci Sequence | |
| |
| |
The BinaryTree class | |
| |
| |
| |
Class Templates | |
| |
| |
| |
Inheritance | |
| |
| |
The Rectangle class | |
| |
| |
The Square class | |
| |
| |
The Cube class | |
| |
| |
| |
virtual Methods | |
| |
| |
| |
Problem Solving Applied: Iterated Prisoner's Dilemma | |
| |
| |
Summary | |
| |
| |
A C++ Standard Library | |
| |
| |
B ASCII Character Codes | |
| |
| |
C Using MATLAB to Plot Data from ASCII Files | |
| |
| |
C++ Program to Generate a Data File | |
| |
| |
ASCII Data File Generated by the C++ Program | |
| |
| |
Generating a Plot with MATLAB | |
| |
| |
D References | |
| |
| |
E PRACTICE! Solutions | |
| |
| |
Index | |