Patterns for Beginning Programmers: With Examples in Java
by David Bernstein
Programming patterns are solutions to problems that require the creation of a small fragment of code that will be part of a larger program. Hence, this book is about teaching you how to write such fragments of code. However, it is not about teaching you the syntax of the statements in the fragments, it assumes that you already know the syntax. Instead, it is about finding solutions to problems that arise when first learning to program.
Preface
List of Figures
List of Tables
I. Patterns Requiring Knowledge of Types, Variables, and Arithmetic Operators
1. Updating
2. Swapping
3. Digit Manipulation
4. Arithmetic on the Circle
5. Truncation
II. Patterns Requiring Knowledge of Logical and Relational Operators, Conditions, and Methods
6. Indicators
7. Indicator Methods
8. Rounding
9. Starts and Completions
10. Bit Flags
11. Digit Counting
III. Patterns Requiring Knowledge of Loops, Arrays, and I/O
12. Reprompting
13. Accumulators
14. Accumulator Arrays
15. Lookup Arrays
16. Interval Membership
17. Conformal Arrays
18. Segmented Arrays
IV. Patterns Requiring Advanced Knowledge of Arrays and Arrays of Arrays