
Java Software Solutions: Foundations of Program Design / Edition 6
by John Lewis (5), William LoftusView All Available Formats & Editions
ISBN-10: 0321532058
ISBN-13: 9780321532053
Pub. Date: 03/11/2008
Publisher: Addison Wesley
As the worldwide best seller for introductory programming using the Java™ programming language, Java Software Solutionsis the premiere model of text that teaches a foundation of programming techniques to foster well-designed object-oriented software. Introduction; Data and Expressions; Using Classes and Objects; Writing Classes;/i>/sup>
Overview
As the worldwide best seller for introductory programming using the Java™ programming language, Java Software Solutionsis the premiere model of text that teaches a foundation of programming techniques to foster well-designed object-oriented software. Introduction; Data and Expressions; Using Classes and Objects; Writing Classes; Conditionals and Loops; Object-Oriented Design; Arrays; Inheritance; Polymorphism; Exceptions; Recursion; Collections. For all readers interested in CS1 in Java.
Product Details
- ISBN-13:
- 9780321532053
- Publisher:
- Addison Wesley
- Publication date:
- 03/11/2008
- Series:
- Pearson Custom Computer Science Series
- Edition description:
- New Edition
- Pages:
- 832
- Product dimensions:
- 7.35(w) x 9.11(h) x 1.20(d)
Table of Contents
Preface | vii | |
Chapter 1 | Introduction | 1 |
1.1 | Computer Processing | 2 |
Software Categories | 3 | |
Digital Computers | 5 | |
Binary Numbers | 7 | |
1.2 | Hardware Components | 10 |
Computer Architecture | 10 | |
Input/Output Devices | 12 | |
Main Memory and Secondary Memory | 13 | |
The Central Processing Unit | 17 | |
1.3 | Networks | 19 |
Network Connections | 19 | |
Local-Area Networks and Wide-Area Networks | 21 | |
The Internet | 22 | |
The World Wide Web | 24 | |
Uniform Resource Locators | 25 | |
1.4 | The Java Programming Language | 26 |
A Java Program | 27 | |
Comments | 29 | |
Identifiers and Reserved Words | 31 | |
White Space | 33 | |
1.5 | Program Development | 35 |
Programming Language Levels | 36 | |
Editors, Compilers, and Interpreters | 38 | |
Development Environments | 40 | |
Syntax and Semantics | 41 | |
Errors | 42 | |
1.6 | Object-Oriented Programming | 43 |
Problem Solving | 44 | |
Object-Oriented Software Principles | 45 | |
Chapter 2 | Data and Expressions | 61 |
2.1 | Character Strings | 62 |
The print and println Methods | 62 | |
String Concatenation | 64 | |
Escape Sequences | 66 | |
2.2 | Variables and Assignment | 69 |
Variables | 69 | |
The Assignment Statement | 71 | |
Constants | 73 | |
2.3 | Primitive Data Types | 73 |
Integers and Floating Points | 74 | |
Characters | 75 | |
Booleans | 77 | |
2.4 | Expressions | 77 |
Arithmetic Operators | 78 | |
Operator Precedence | 78 | |
Increment and Decrement Operators | 83 | |
Assignment Operators | 84 | |
2.5 | Data Conversion | 85 |
Conversion Techniques | 87 | |
2.6 | Interactive Programs | 88 |
The Scanner Class | 88 | |
2.7 | Graphics | 93 |
Coordinate Systems | 94 | |
Representing Color | 95 | |
2.8 | Applets | 96 |
Executing Applets Using the Web | 98 | |
2.9 | Drawing Shapes | 99 |
The Graphics Class | 99 | |
Chapter 3 | Using Classes and Objects | 113 |
3.1 | Creating Objects | 114 |
Aliases | 116 | |
3.2 | The String Class | 118 |
3.3 | Packages | 121 |
The import Declaration | 122 | |
3.4 | The Random Class | 124 |
3.5 | The Math Class | 127 |
3.6 | Formatting Output | 130 |
The NumberFormat Class | 130 | |
The DecimalFormat Class | 133 | |
The printf Method | 135 | |
3.7 | Enumerated Types | 135 |
3.8 | Wrapper Classes | 138 |
Autoboxing | 141 | |
3.9 | Components and Containers | 141 |
Frames and Panels | 142 | |
3.10 | Nested Panels | 145 |
3.11 | Images | 148 |
Chapter 4 | Writing Classes | 155 |
4.1 | Anatomy of a Class | 156 |
Instance Data | 161 | |
UML Class Diagrams | 162 | |
4.2 | Encapsulation | 163 |
Visibility Modifiers | 164 | |
Accessors and Mutators | 165 | |
4.3 | Anatomy of a Method | 166 |
The return Statement | 167 | |
Parameters | 169 | |
Local Data | 170 | |
Bank Account Example | 171 | |
4.4 | Constructors Revisited | 175 |
4.5 | Graphical Objects | 175 |
4.6 | Graphical User Interfaces | 184 |
4.7 | Buttons | 185 |
4.8 | Text Fields | 189 |
Chapter 5 | Conditionals and Loops | 201 |
5.1 | Boolean Expressions | 202 |
Equality and Relational Operators | 203 | |
Logical Operators | 204 | |
5.2 | The if Statement | 207 |
The if-else Statement | 209 | |
Using Block Statements | 212 | |
The Conditional Operator | 217 | |
Nested if Statements | 218 | |
5.3 | Comparing Data | 220 |
Comparing Floats | 220 | |
Comparing Characters | 221 | |
Comparing Objects | 222 | |
5.4 | The switch Statement | 223 |
5.5 | The while Statement | 227 |
Infinite Loops | 232 | |
Nested Loops | 234 | |
Other Loop Controls | 237 | |
5.6 | Iterators | 238 |
Reading Text Files | 239 | |
5.7 | The do Statement | 242 |
5.8 | The for Statement | 245 |
Iterators and for Loops | 249 | |
Comparing Loops | 251 | |
5.9 | Drawing with Loops and Conditionals | 251 |
5.10 | Determining Event Sources | 254 |
5.11 | Dialog Boxes | 260 |
5.12 | More Button Components | 263 |
Check Boxes | 264 | |
Radio Buttons | 267 | |
Chapter 6 | Object-Oriented Design | 287 |
6.1 | Software Development Activities | 288 |
6.2 | Identifying Classes and Objects | 289 |
Assigning Responsibilities | 291 | |
6.3 | Static Class Members | 291 |
Static Variables | 292 | |
Static Methods | 292 | |
6.4 | Class Relationships | 296 |
Dependency | 296 | |
Dependencies Among Objects of the Same Class | 296 | |
Aggregation | 303 | |
The this Reference | 305 | |
6.5 | Interfaces | 309 |
The Comparable Interface | 315 | |
The Iterator Interface | 316 | |
6.6 | Enumerated Types Revisited | 316 |
6.7 | Method Design | 319 |
Method Decomposition | 320 | |
Method Parameters Revisited | 325 | |
6.8 | Method Overloading | 328 |
6.9 | Testing | 333 |
Reviews | 334 | |
Defect Testing | 334 | |
6.10 | GUI Design | 336 |
6.11 | Layout Managers | 337 |
Flow Layout | 339 | |
Border Layout | 344 | |
Grid Layout | 348 | |
Box Layout | 350 | |
6.12 | Borders | 354 |
6.13 | Containment Hierarchies | 358 |
Chapter 7 | Arrays | 369 |
7.1 | Array Elements | 370 |
7.2 | Declaring and Using Arrays | 371 |
Bounds Checking | 373 | |
Alternate Array Syntax | 379 | |
Initializer Lists | 379 | |
Arrays as Parameters | 380 | |
7.3 | Arrays of Objects | 381 |
7.4 | Command-Line Arguments | 392 |
7.5 | Variable Length Parameter Lists | 394 |
7.6 | Two-Dimensional Arrays | 398 |
Multidimensional Arrays | 402 | |
7.7 | The ArrayList Class | 403 |
Specifying an ArrayList Element Type | 404 | |
ArrayList Efficiency | 406 | |
7.8 | Polygons and Polylines | 407 |
The Polygon Class | 408 | |
7.9 | Mouse Events | 412 |
7.10 | Key Events | 420 |
Chapter 8 | Inheritance | 437 |
8.1 | Creating Subclasses | 438 |
The protected Modifier | 443 | |
The super Reference | 444 | |
Multiple Inheritance | 448 | |
8.2 | Overriding Methods | 449 |
Shadowing Variables | 451 | |
8.3 | Class Hierarchies | 452 |
The Object Class | 454 | |
Abstract Classes | 455 | |
Interface Hierarchies | 457 | |
8.4 | Visibility | 458 |
8.5 | Designing for Inheritance | 461 |
Restricting Inheritance | 462 | |
8.6 | The Component Class Hierarchy | 463 |
8.7 | Extending Adapter Classes | 465 |
8.8 | The Timer Class | 469 |
Chapter 9 | Polymorphism | 481 |
9.1 | Late Binding | 482 |
9.2 | Polymorphism via Inheritance | 483 |
9.3 | Polymorphism via Interfaces | 496 |
9.4 | Sorting | 498 |
Selection Sort | 498 | |
Insertion Sort | 505 | |
Comparing Sorts | 506 | |
9.5 | Searching | 507 |
Linear Search | 507 | |
Binary Search | 511 | |
Comparing Searches | 513 | |
9.6 | Designing for Polymorphism | 513 |
9.7 | Event Processing | 514 |
9.8 | File Choosers | 515 |
9.9 | Color Choosers | 518 |
9.10 | Sliders | 521 |
Chapter 10 | Exceptions | 531 |
10.1 | Exception Handling | 532 |
10.2 | Uncaught Exceptions | 533 |
10.3 | The try-catch Statement | 534 |
The finally Clause | 537 | |
10.4 | Exception Propagation | 538 |
10.5 | The Exception Class Hierarchy | 541 |
Checked and Unchecked Exceptions | 544 | |
10.6 | I/O Exceptions | 545 |
10.7 | Tool Tips and Mnemonics | 549 |
10.8 | Combo Boxes | 556 |
10.9 | Scroll Panes | 562 |
10.10 | Split Panes | 564 |
Chapter 11 | Recursion | 575 |
11.1 | Recursive Thinking | 576 |
Infinite Recursion | 577 | |
Recursion in Math | 577 | |
11.2 | Recursive Programming | 578 |
Recursion vs. Iteration | 581 | |
Direct vs. Indirect Recursion | 581 | |
11.3 | Using Recursion | 582 |
Traversing a Maze | 582 | |
The Towers of Hanoi | 588 | |
11.4 | Recursion in Graphics | 593 |
Tiled Pictures | 593 | |
Fractals | 596 | |
Chapter 12 | Collections | 611 |
12.1 | Collections and Data Structures | 612 |
Separating Interface from Implementation | 612 | |
12.2 | Dynamic Representations | 613 |
Dynamic Structures | 613 | |
A Dynamically Linked List | 614 | |
Other Dynamic List Representations | 619 | |
12.3 | Linear Data Structures | 621 |
Queues | 621 | |
Stacks | 622 | |
12.4 | Non-Linear Data Structures | 624 |
Trees | 625 | |
Graphs | 626 | |
12.5 | The Java Collections API | 628 |
Generics | 628 | |
Appendix A | Glossary | 639 |
Appendix B | Number Systems | 665 |
Appendix C | The Unicode Character Set | 673 |
Appendix D | Java Operators | 677 |
Appendix E | Java Modifiers | 683 |
Appendix F | Java Coding Guidelines | 687 |
Appendix G | Java Applets | 693 |
Appendix H | Regular Expressions | 695 |
Appendix I | JavaDoc | 697 |
Appendix J | The PaintBox Project | 703 |
Appendix K | GUI Events | 715 |
Appendix L | Java Syntax | 719 |
Appendix M | The Java Class Library | 733 |
Index | 893 |
Customer Reviews
Average Review: