Embracing in full the new features of the Java 2 platform as they apply to CS1 topics, this leading textbook continues to teach beginning programs how to design and implement high-quality object-oriented software. New in the second edition is a chapter entitled "Input and Output" (Ch. 7), which explains the class library used earlier in the text and explores other I/O issues such as streams, file I/O, and network-based I/O. Applets and applications are intertwined throughout the book to demonstrate computing concepts-applets, introduced in Ch. 2, build on the excitement of the web, while applications allow students to gain a clear understanding of programming concepts.
Lewis and Loftus have expanded their coverage of classes and objects with this edition (introduced in Ch. 4) to provide more in-depth discussion of methods and parameter passing, method and static variables, and method overloading. Discussion of Swing architecture and components is also new to this edition, as well as the inclusion of new Collection classes.
The Update to the second edition has been published to provide readers with additional resources to enhance their learning. It includes a CD-ROM with various development environments, the textbook example code, and the presentation slides from the book. The typeface for of some of the code has been redesigned to make it more legible. Lastly, the update includes all corrections that have been discovered since the second edition's publication. The main content and flow of the update will remain as it is.
1. Computer Systems.
Graphics.2. Objects and Primitive Data.
Introduction to Objects.
Variables and Assignments.
Primitive Data Types and Expressions.
Class Libraries and Packages.
Invoking Class Methods.
An Introduction to Applets.
Drawing Shapes.3. Program Statements.
The if Statement.
The switch Statement.
Boolean Expressions Revisited.
The while Statement.
The do Statement.
The for Statement.
Drawing using Conditionals and Loops.4. Writing Classes.
Anatomy of a Class.
Anatomy of a Method.
Graphical Objects.5. Enhancing Classes.
The static Modifier.
Events and Listeners.
Animations.6. Arrays and Vectors.
Arrays of Objects.
The Vector Class.
Arrays and Graphics.7. Inheritance.
Polymorphism via Inheritance.
Indirect Use of Noninherited Members.
Inheritance and Graphics.
GUI Components.8. Exceptions and I/O Streams.
Input / Output Streams.
Object Serialization.9. Graphical User Interfaces.
Java GUI Overview
GUI Design10. Software Engineering.
Software Development Models.
The PaintBox Project.11. Recursion.
Recursion in Graphics.12. Data Structures.
Implementing Data Structures
Classic Data Structures @AHEADS= Collection ClassesAppendix A. Glossary. Appendix B. Number Systems. Appendix C. The Unicode Character Set. Appendix D. Java Operators. Appendix E. Java Bitwise Operators. Appendix F. Java Modifiers. Appendix G. Java Coding Guidelines. Appendix H. Review Checklist. Appendix I. Comparing Java to C++. Appendix J. An HTML Tutorial. Appendix K. Java Exceptions and Errors. Appendix L. Java Syntax. Appendix M. The Java Class Library.