Java by Dissection: The Essentials of Java Programming, Updated Edition
0201751585

Ira Pohl, University of California - Santa Cruz
Charlie McDowell, University of California - Santa Cruz

Publisher: Addison-Wesley
Copyright: 2002
Format: Paper Bound with PIN; 509 pp

ISBN-10: 0201751585
ISBN-13:9780201751581

Our Price: £50.99
Status: Not Yet Published
Estimated Availability: 15 Oct 2001

Big Savings with Valuepacks!


Description

Enlisting the best-selling “by dissection” method of instruction, this book teaches programming techniques and presents the Java language in a sound and structured manner that is appropriate for both novice and seasoned programmers. It presents a thorough introduction to the programming process by carefully developing working programs to illuminate key features of the Java programming language. Program code is explained in an easy-to-follow manner throughout.

This book presents readers with a clear and thorough introduction to the programming process by carefully developing working Java programs, using the method of dissection. A dissection is similar to a structured walk-through of the code, with the intention of explaining newly encountered programming elements and idioms as found in working code to the reader. Key ideas are reinforced throughout by use in different contexts.

The Updated edition includes a free “On to C” primer that will help readers transition from the Java language to the C language following the same “by dissection” method used in the book.


Table Of Contents


Preface.


Acknowledgments.


1. Introduction.

Recipes.

Algorithms - Being Precise.

Implementing Our Algorithm in Java.

Why Java?

Network Computing and the Web.

Human-Computer Interaction and the GUI.



2. Program Fundamentals.

“Hello, world!” in Java.

Compiling and Running Your Java Program.

Lexical Elements.

Data Types and Variable Declarations.

An Example: String Concatenation.

User Input.

Calling Predefined Methods.

More on print() and println().

Number Types.

Arithmetic Expressions.

Assignment Operators.

The Increment and Decrement Operators.

Precedence and Associativity of Operators

Programming Style.



3. Statements and Control Flow.

Expression, Block, and Empty Statements.

Boolean Expressions.

The if Statement.

The if-else Statement.

The while Statement.

The for Statement.

The break and continue Statements.

The switch Statement.

Using the Laws of Boolean Algebra.

Programming Style.



4. Methods: Functional Abstraction.

Method Invocation.

Static Method Definitions.

The return Statement.

Scope of Variables.

Top-Down Design.

Problem Solving: Random Numbers.

A Simulation: Probability Calculations.

Invocation and Call-by-Value.

Scope of Variables.

Problem Solving: A Computer Game.

Recursion.

Problem Solving: Mathematical Functions.

Method Overloading.

Programming Style.



5. Arrays.

One-Dimensional Arrays.

Passing Arrays to Methods.

Array Assignment.

Finding the Minimum and Maximum of an Array.

A Simple Sorting Method.

Searching an Ordered Array.

Big-Oh: Choosing the Best Algorithm.

Type and Array.

Two-Dimensional Arrays.

An Elementary Simulation: The “Game of Life”.

Arrays of Non-Primitive Types.

Programming Style.



6. Objects: Data Abstraction.

String: Using a Standard Class.

StringBuffer: Using Mutator Methods.

The Elements of a Simple Class.

Access public and private: Data Hiding.

Constructor Methods and Object Creation.

Static Fields and Methods.

Calling Methods-a Recap.

Problem Solving: Making Change.

Accessing Another Object's Private Fields.

Passing Objects: Reference Types.

Scope.

Keyword final and Class Constants.

Arrays of Objects.

Object-Oriented Design.

Programming Style.



7. Inheritance.

A Student “Is a” Person.

Overriding Instance Methods.

The Access Modifiers private and public Revisited.

The Access Modifier protected.

Type Object and Inheritance.

Wrapper Classes.

Abstract Classes.

An Example: Predator-Prey Simulation.

Interfaces.

Multiple Inheritance.

Inheritance and Design.

The Operator insistanceof and Casting Nonprimitive Types.

Programming Style.



8. Graphical User Interfaces: Part I.

“Hello world!” Button.

Listening to Events.

Text and Numerical Input.

Using Several Components.

Drawing with Swing.

The Layout Manager FlowLayout.

A Simple Drawing Program.

Applets.

Programming Style.



9. Graphical User Interfaces: Part II.

Arranging Components in a GUI.

Getting a Component to Resize.

Problem Solving: Plotting Data.

The Class Graphics.

Changing the Stroke Used in Drawing.

Adding Menus to your GUI.

Event Listeners and Adapters.

Programming Style.



10. Reading and Writing Files.

Types of Files.

Writing Text Files.

Reading Text Files.

Formatting Text Output.

Problem Solving: Encrypting Text Files.

Reading and Writing Binary Files.

Detecting the End of an Input Stream.

Programming Style.



11. Exceptions.

Exception Handling with try and catch.

Catching an EOFException.

Abrupt Return from Methods That Throw Exceptions.

Catching Several Different Exceptions.

The finally Clause.

Program Correctness: Throwing an Exception.

RuntimeExceptions and the throws Clause.

Programming Style.



12. Dynamic Data Structures.

Self-Referential Structures.

A Linked List Implementation of a Stack.

A Singly Linked List.

More Operations on Lists.

A Generic Stack.

An Example: Polish Notation and Stack Evaluation.

Queues.

Iterators.

Iterators and the Interface Iterator.

Deleting Objects.

Packages.

Programming Style.



13. Concurrent Programming with Java Threads.

Implicit Threads from AWT.

Creating Threads.

Communicating between Two Threads.

Synchronizing Two Threads.

Passing Messages to Another Computer.

A MultiThreaded Server.

More About the Methods sleep(), wait(), and notify().

Programming Style.



Appendix A. Getting Down to the Bits.

Integer Binary Representation.

Floating Point Representations.

Manipulating Bits.



Appendix B. Reference Tables.

Operator Precedence Table.

The Standard Java Math Functions.



Appendix C. The Text I/O Package tio.

The Class tio.Readinput.

The Class tio.FormattedWriter.

The Class tio.ReadException.

The Class tio.Console.

The Class tio.PrintFileWriter



Appendix D. Summary of Selected Swing Components.

The Class JButton.

The Class JComboBox.

The Class JList

The Class JLabel.

The Class JTextField.

The Class JTextArea.

The Class JPanel.

The Class JScrollPane.



Index.

Features
  • NEW - NEW! Includes free access to JavaPlace.net, an online resource to enhance the teaching and learning of CS1 in Java.
  • Executable complete programs in every chapter are explained using the classic dissection method-a structured walkthrough of the code.
  • Teaches the mainstream language features of Java 2, including AWT and threads, while remaining the appropriate length for a one-semester course on the subject.
  • Simplified Input package allows novice Java programmers to use the language early on without advanced knowledge of the language.
  • Stresses programming style and methodology throughout, with careful explanation as to its importance and rationale.
  • Uses full, executable code from the start so students can better understand and appreciate the programming ideas under construction.
  • Common Programming Errors, end-of-chapter review questions, exercises, and summaries, as well as an Instructor's Manual with answers, make this an ideal text from which to learn and teach the material.

Appropriate Courses
Java—Intro to Programming/CSI, Java—Intermediate Programming.

All Valuepacks
Java by Dissection:The Essentials of Java Programming with Experiments in Java:An Introductory Lab Manual
Pohl, McDowell & Rebelsky
© 2004 | Addison-Wesley | Kit/Package/ShrinkWrap | Estimated Availability: 23 Aug 2004
ISBN-10: 0582832004 | ISBN-13: 9780582832008
Our Price: £43.99

Package consists of:
Experiments in Java: An Introductory Lab Manual
Java by Dissection: The Essentials of Java Programming, Updated Edition

Java by Dissection:The Essentials of Java Programming, Updated Edition, JavaPlace Edition with Haskell:The Craft of Functional Programming

© 2003 | Addison-Wesley | Kit/Package/ShrinkWrap | Estimated Availability: 06 Nov 2003
ISBN-10: 058284942X | ISBN-13: 9780582849426
Our Price: £56.99

Package consists of:
Java by Dissection: The Essentials of Java Programming, Updated Edition
Haskell:The Craft of Functional Programming, 2/E

Multi Pack: C How to Program (International Edition) and Java by Dissection:The Essentials of Java Programming Updated Edition, Java Place Edition
Deitel & Pohl
© 0 | Prentice Hall | Kit/Package/ShrinkWrap | Estimated Availability: 31 Aug 2004
ISBN-10: 1405814306 | ISBN-13: 9781405814300
Our Price: £73.98

Package consists of:
C How to Program: International Edition, 4/E
Java by Dissection: The Essentials of Java Programming, Updated Edition


Student Supplements
Stand-alone Access Code Tutor Center
Addison-Wesley
© 2008 | Addison-Wesley | Access Code Card | This title is ordered on demand which may result in extended delivery times.
ISBN-10: 0201721708 | ISBN-13: 9780201721706
Our Price: £18.99

The Addison-Wesley Math Tutor Center is staffed by qualified college instructors who provide students with tutoring on examples and odd-numbered exercises from the textbook. Tutoring is available via toll-free telephone, toll-free fax, e-mail, and the Internet. Interactive, Web-based technology allows tutors and students to view and work through problems together in real time over the Internet. Instructors are available to answer students' questions during evening hours and on weekends. The Addison-Wesley Math Tutor Center is available to qualified adopters. For more information, please visit our Website at www.aw-bc.com/tutorcenter or call us at 1-888-777-0463.


JavaPlace.net, 2/E
Addison-Wesley
© 2002 | Addison-Wesley | Website | Available
ISBN-10: 0201799758 | ISBN-13: 9780201799750

JavaPlace.net is a complete online resource for students learning to program with Java, and includes additional examples, quizzes, programming projects, and more!




Instructor Supplements
JavaPlace.net, 2/E
Addison-Wesley
© 2002 | Addison-Wesley | Website | Available
ISBN-10: 0201799758 | ISBN-13: 9780201799750

JavaPlace.net is a complete online resource for students learning to program with Java, and includes additional examples, quizzes, programming projects, and more!