Always Learning

Java by Dissection: The Essentials of Java Programming
Ira PohlUniversity of California-Santa Cruz
Charlie McDowellUniversity of California-Santa Cruz

ISBN-10: 0201612488
ISBN-13:  9780201612486

Publisher:  Addison-Wesley
Copyright:  2000
Format:  Paper; 509 pp
Published:  11/18/1999
We're sorry, this product is no longer available and has been replaced with Java by Dissection: The Essentials of Java Programming, Updated Edition.

Please contact your Pearson rep if you are using this product and need instructor resources.


Print this content

In this section:


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 to the reader newly encountered programming elements and idioms as found in working code. Key ideas are reinforced throughout by use in different contexts.


Features

  • Executable complete programs in every chapter are explained using the classic dissection method—a structured walkthrough of the code. Pg.___
  • 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. Pg.___
  • Simplified Input package allows novice Java programmers to use the language early on without advanced knowledge of the language. Pg.___
  • Stresses programming style and methodology throughout, with careful explanation of its importance and rationale. Pg.___
  • Uses full, executable code from the start so students can better understand and appreciate the programming ideas under construction. Pg.___
  • 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. Pg.___


Table of Contents



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.

Precedence and Associativity of Operators.

Data Types and Variable Declarations.

An Example: String Concatenation.

Input from the User.

Calling Predefined Methods.

Some 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 and the if-else Statements.

Problem Solving with the if Statement.

The if-else Statements.

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.

Top-Down Design.

Problem Solving: Random Numbers.

A Simulation: Probability Calculations.

Invocation and Call-by-Value. AHEADS = 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.

A Simple Sorting Method.

Searching an Ordered Array.

Big-Oh: Choosing the Best Algorithm.

Two-Dimensional Arrays.

An Elementary Simulation: The "Game of Life".

Arrays of Non-Primitive Types.

Programming Style.



6. Objects: Data Abstraction.

Creating and Manipulating Objects.

Problem Solving: Rectangles.

The Elements of a Simple Class.

Access public and private: Data Hiding.

Constructor Methods and Object Creation.

Static Fields and Methods.

Calling Methodsna Recap.

Problem Solving: Roots of a Quadratic.

Accessing Another Object's Private Fields.

Passing Objects and Call-By-Reference.

The “this” Reference.

Keyword, Final, and Class Constants.

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.

Inheritance and Design.

The Instance of Operator and Casting Non-Primitive Types.

Programming Style.



8. Graphic User Interfaces: Part I.

"Hello world!" Button.

Listening to Events.

Text and Numerical Input.

Using Several Components.

Drawing with Swing.

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 Graphics Class.

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.

Using Command Line Argument.

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.

Program Correctness: Throwing an Exception.

RuntimeExceptions and the throws Clause.



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 Enumeration.

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 Multi-Threaded Server.

More About the 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. Syntax Charts.

Fundamentals.

Declaring Variables.

Declaring Methods.

Expressions.

Statements.

Classes.



Appendix E. AWT Summary.

The Class JPanel.

The Class JScrollPane.



Index.



Back to top

Print this content

In this section:


Author Bios

Ira Pohl is a Professor of Computer Science at the University of California, Santa Cruz and holds a Ph.D. in Computer Science from Stanford University. His research interests include artificial intelligence, the C and C++ programming languages, practical complexity problems, heuristic search methods, deductive algorithms, and educational and social issues. He originated error analysis in heuristic search methods and deductive algorithms.

Professor Pohl was formerly a Mackay professor at University of California- Berkeley and a ZWO fellow in the Netherlands. He is the author or co-author of Object-Oriented Programming Using C++, C++ Distilled: A Concise Ansi/Iso Reference and Style Guide, C by Dissection: The Essentials of C Programming, A Book on C: Programming in C, C++ for C Programmers, C++ for Fortran Programmers, C++ for Pascal Programmers, and Turbo C: The Essentials of C Programming, all published by Addison-Wesley. Charlie McDowell is an Associate Professor in the Computer Science Department at the University of California, Santa Cruz and holds a Ph.D. degree in Computer Science from the University of California, San Diego. He is a member of the Association for Computing Machinery and of the IEEE Computer Society. When not teaching or writing, he can be found playing trombone with a number of local musical groups.

0201612488AB04062001


Backcover Copy

Java by Dissection provides a comprehensive, example-based coverage of the Java language stressing programming style and methodology. It assumes no prior programming experience, making it ideal for readers who are starting out in their software development careers as well as programmers who want to expand their skills.

Teaching "by Dissection"
Java by Dissection stresses working code, introducing full working programs from the start. In each chapter a program particularly illustrative of the chapter's themes is presented and then analyzed by dissection, Ira Pohl's trademark code presentation technique which illustrates the underlying structure of programs. This dissection of code helps readers comprehend newly encountered programming elements and idioms.

Traditional and Object-Oriented Programming
Java by Dissection begins by explaining how all the basic data types and control statements are used traditionally, and then progresses to the object-oriented features of the Java language and their importance to program design. This gradual introduction to OOP ensures that novices attain an understanding of programming basics before moving onto Java's object-oriented features.

Advanced Topics
The second-half of Java by Dissection explains in detail much that is sophisticated about Java, such as its threading, GUI, exception handling, and file manipulation capabilities. As such it is appropriate if you are looking for an advanced book or a book with excellent reference value.

0201612488B04062001

Back to top

Log in to the Instructor Resource Center

Login name: 

  Password: 

Forgot login/password?  |  Need to redeem an access code?

        

Instructor Resource Center File Download

This work is protected by local and international copyright laws and is provided solely for the use of instructors in teaching their courses and assessing student learning. Dissemination or sale of any part of this work (including on the World Wide Web) will destroy the integrity of the work and is not permitted. The work and materials from this site should never be made available to students except by instructors using the accompanying text in their classes. All recipients of this work are expected to abide by these restrictions and to honor the intended pedagogical purposes and the needs of other instructors who rely on these materials.

Cancel     I accept, proceed with download

Print this content

Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students contact your Pearson Higher Education representative.

Back to top