did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780470090251

Developing Java Software

by ;
  • ISBN13:

    9780470090251

  • ISBN10:

    0470090251

  • Edition: 3rd
  • Format: Paperback
  • Copyright: 2006-11-28
  • Publisher: WILEY
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $93.81 Save up to $54.43
  • Buy New
    $93.34
    Add to Cart Free Shipping Icon Free Shipping

    PRINT ON DEMAND: 2-4 WEEKS. THIS ITEM CANNOT BE CANCELLED OR RETURNED.

Supplemental Materials

What is included with this book?

Summary

This significantly updated new edition of Developing Java Software is a thorough presentation of object-oriented design and programming concepts using the Java 5 programming language. The book takes the reader from the basics of using Java 5 to the creation of complete, object-oriented programs. Following an 'objects early' approach, the core elements of the Java language are covered, including the use of recently added features such as generics.The encouragement of the proper creation and use of classes, and the demonstration of the strategies used to create good quality code are at the core of this book. You will learn how Java programs work and how they can be designed and implemented in an organized and systematic way. In addition, the book addresses how a Java programming project should be managed and introduces the Ant build tool and the Subversion version control system.Testing has always been an important part of Developing Java Software. This edition provides new chapters which give a detailed introduction to Test-driven Development (TDD). This approach to programming introduces more rigor to writing programs by placing emphasis on writing high quality testable and tested code from the outset. A series of examples and case studies shows how TDD works and highlights the strategies for testing code.Reflecting recent changes to the Java programming language and newly focused on first courses in programming, this excellent primer is ideal for classroom use or self-study. The many motivating examples and larger case studies show how core ideas can be applied when creating real applications, and show how to use object-oriented methods effectively to create robust, reliable, and fully-tested Java applications.

Author Biography

Russel Winder was previously Professor of Computer Science and Head of Department at Kings College London.

Graham Roberts lectures at Department of Computer Science, University College London, UK.

Table of Contents

Preface xix
Part 1 Programming with Objects and Classes
1(348)
Introduction
3(10)
The Start
4(1)
A (Very!) Short History of Java
4(2)
Being at the Right Place at the Right Time
6(1)
What is Java?
6(1)
Abstraction: The Critical Core of Programming
7(1)
The Java 2 Platform
8(1)
Java is Architecture Neutral
9(2)
Java and its Jokes
11(1)
Summary
12(1)
Programming Fundamentals
13(44)
Introduction
14(1)
Abstraction and the Big Picture
15(1)
Statement Sequences
16(3)
Iteration
19(4)
The Java While Statement and Compound Statement
21(1)
The Java Do Statement
22(1)
Selection
23(3)
The Java If Statement
24(1)
The Java Break Statement
25(1)
State
26(6)
Variable Names
27(1)
Assignment
27(1)
Variable Types
28(1)
Initializing Variables
29(1)
Constant Variables (aka Named Constants)
30(1)
Variables and Type Checking
30(1)
Comparing Variables
31(1)
Writing a Simple Java Program
32(3)
Comments
35(3)
Output Statements
38(1)
Input Statements
39(1)
Interactive Programs
40(11)
Basic Input and Output
40(1)
Using Strings
41(4)
Using Expressions
45(6)
Summary
51(6)
Self-review Questions
52(1)
Programming Exercises
53(1)
Challenges
54(3)
Adding Structure
57(46)
Introduction
58(1)
Abstraction and Encapsulation
59(1)
Methods
59(9)
Returning Values from a Method
62(1)
Methods and Type Void
63(1)
Method Parameters
63(2)
Multiple Method Parameters
65(1)
Recursion
66(2)
Writing Programs with Methods
68(9)
Program MultiplicationTable
68(3)
Program Palindrome
71(6)
Procedural Decomposition
77(1)
Encapsulation
78(3)
Scope and Lifetime
79(1)
Names and Scope
80(1)
Some More Operators
81(2)
Increment, Decrement and Assignment Operators
81(1)
Arithmetic Expressions and Types
82(1)
Conditional Operator
83(1)
Some More Control Statements
83(2)
For Loops
83(2)
The Switch Statement
85(1)
Some More Example Programs
85(12)
Program CharacterTriangle
86(1)
Program CharacterRectangle
87(3)
Program ConvertBinaryToDecimal
90(7)
Summary
97(6)
Self-review Questions
97(1)
Programming Exercises
98(2)
Challenges
100(3)
Introducing Containers
103(40)
Introduction
104(1)
Arrays
104(15)
Declaring an Array
104(2)
Array Indexing
106(1)
The Foreach Loop
107(1)
Arrays as Method Parameters
107(1)
Arrays as Return Values
108(1)
Program Mean
108(4)
The Class Arrays
112(1)
Multidimensional Arrays
112(1)
Array Initialization Expressions
113(1)
Program AddUpColumns
114(1)
The main Method Parameter
115(3)
Character Arrays and Strings
118(1)
Container Classes
119(6)
ArrayList
119(2)
Containers and Primitive Types
121(2)
The Foreach Loop (Again)
123(1)
Program Mean Revisited
123(2)
Data Files
125(13)
Text Data
126(1)
Reading Data with FileInput
127(2)
Writing Data with FileOutput
129(1)
Program DisplayTextFile
130(2)
Program Copy
132(3)
Program WordCount
135(3)
Summary
138(5)
Self-review Questions
139(1)
Programming Exercises
139(2)
Challenges
141(2)
Drawing Pictures
143(28)
Introduction
144(1)
Creating Drawings
144(8)
Drawing a Line Segment
147(2)
Drawing Rectangles, Squares, Ellipses and Circles
149(2)
Other Standard Drawing Primitives
151(1)
Creating New Shapes
151(1)
Properties of Drawings
152(3)
Colour
152(1)
Line Thickness
153(1)
Filled Shapes
154(1)
Drawing Text
155(1)
Example Programs
156(11)
Program Chessboard
156(2)
Program Spiral
158(4)
Program Graph
162(5)
Summary
167(4)
Self-review Questions
167(1)
Programming Exercises
168(1)
Challenges
169(2)
Classes and Objects
171(54)
Introduction
172(1)
Creating New Data Types
172(6)
A Stack Object
173(1)
A Stack Class
174(4)
Generic Classes
178(3)
Method Names and Scope
181(2)
Overloading Methods
182(1)
Object Initialization
183(5)
Direct Instance Variable Initialization
184(1)
Constructors
185(1)
Instance Initializers
186(1)
Choosing Between the Alternatives
187(1)
Objects and References
188(9)
Removing Old Objects
189(1)
Objects, References and Primitive Types
190(1)
Objects and Method Parameters
190(2)
Copying Objects
192(1)
Equality and Objects
193(1)
Null
194(1)
This
195(2)
Static Variables and Methods
197(3)
Example Classes
200(11)
Class Name
200(4)
Class Matrix
204(3)
Class Graph
207(4)
Programming with Classes and Objects
211(2)
Objects Providing Services
212(1)
Classes and Encapsulation
213(1)
Enumerated Types
213(3)
An Example---Creating Bridge Hands
216(4)
Summary
220(5)
Self-review Questions
221(1)
Programming Exercises
222(1)
Challenges
222(3)
Class Relationships
225(44)
Introduction
226(1)
Association
226(2)
Ownership
227(1)
Effective Association
227(1)
Inheritance
228(10)
Using Inheritance
228(2)
Protected
230(1)
Inheritance and Constructors
231(1)
Super
232(1)
Example Queue<T> and Dequeue<T> Implementations
233(1)
Static Variables and Inheritance
234(1)
Hiding Names
235(1)
Method Overriding and Dynamic Binding
236(2)
Reuse: Inheritance vs. Association
238(2)
Inheritance Hierarchies
240(3)
Class Object
240(1)
Abstract Classes
241(2)
Interfaces and Type Conformance
243(4)
Substitutability, Types and Conformance
244(1)
Interfaces and Their Implementations
245(2)
Comparing Objects for Equality
247(4)
Class Class and Instanceof
249(1)
An Idiom
250(1)
Nested Classes
251(2)
Packages
253(2)
Class Matrix Revisited
255(9)
Reusability and Components
264(2)
Summary
266(3)
Self-review Questions
267(1)
Programming Exercises
267(1)
Challenges
267(2)
Exceptions
269(30)
What's the Problem?
270(1)
Kinds of Errors
271(1)
Representing Exceptions
272(1)
Throwing an Exception
273(2)
Catching Exceptions
275(2)
The Finally Block
277(1)
Plan to Use Exceptions
278(1)
Some Examples
278(18)
ConvertBinaryToDecimal with Exceptions
278(5)
Copy Coded in a More Sophisticated Way
283(9)
Rewriting WordCount
292(1)
Stack Type with Error Handling
293(3)
Summary
296(3)
Self-review Questions
297(1)
Programming Exercises
297(2)
Introducing Concurrency with Threads
299(22)
Doing More Than One Thing At Once
300(1)
Threads
300(2)
Using Threads
302(1)
Thread Synchronization
303(1)
Thread Scheduling
304(1)
Example Programs
305(14)
A Text Clock
305(4)
A Shared Queue
309(4)
A Network Application
313(6)
Summary
319(2)
Self-review Questions
319(1)
Programming Exercises
319(2)
User Interfaces
321(28)
Introduction
322(2)
Visual Components
322(1)
Events and Event-driven Systems
323(1)
AWT and Swing
323(1)
Core GUI Concepts
324(12)
Program HelloGoodbye
324(2)
Creating the Window
326(1)
Creating the Swing GUI Components
326(2)
Containers and Layout Managers
328(2)
The Layout Manager Advantage
330(1)
Different Layout Managers
331(1)
Displaying the Window
332(1)
Processing Events
333(1)
Running and Terminating the HelloGoodbye Program
334(1)
HelloGoodbye Summary
335(1)
Text Input with a GUI
336(2)
A Very Simple Text Editor
338(4)
Menus
342(4)
Painting
346(1)
Summary
346(3)
Self-review Questions
347(1)
Programming Exercises
347(1)
Challenges
348(1)
Part 2 The Process of Programming
349(152)
The Programming Process
351(36)
Introduction
352(2)
Object-oriented Software Engineering
352(1)
Agile Methods
353(1)
Design Documentation
353(1)
Why Object-oriented?
354(3)
Route Planning---An Allegory
354(1)
Problem Domains
355(1)
Encapsulation
356(1)
Development Tasks
357(11)
An Overview
357(1)
Initial Problem Statement
358(1)
User Requirements Gathering with Stories
358(1)
Functional Requirements and Use Cases
359(3)
Analysis
362(2)
Design, Implementation and Testing
364(1)
Delivery, Deployment and Maintenance
365(2)
Reviewing and Iterating
367(1)
Testing Strategies
368(3)
Unit and Functional Testing
368(1)
Acceptance Testing
369(1)
Debugging
370(1)
UML Class, Object and Sequence Diagrams
371(11)
Class Diagrams
372(6)
Packages
378(1)
Object Diagrams
379(1)
Sequence Diagrams
380(2)
Casual Notation
382(1)
Practice and Experience
382(1)
Summary
383(4)
Self-review Questions
383(1)
Programming Exercises
384(1)
Challenges
385(2)
Unit Testing
387(38)
Introduction
388(2)
What is Testing?
388(1)
Why Test at All?
389(1)
Unit Testing---A First Example
390(3)
The Class and its Test
390(2)
How the Test was Run
392(1)
The Core Principles of Unit Testing
393(2)
Questions
394(1)
This Code Cannot be Tested
394(1)
Test-driven Development
395(3)
Refactoring
395(1)
Duplication
396(1)
Red, Green, Refactor
396(2)
Tests as Specifications
398(1)
The TestNG Framework
398(6)
Test Cycle
399(1)
Testing Test Classes
400(1)
Configuration Methods
400(1)
Test Methods
401(1)
Exceptions
402(1)
Assertions
402(2)
The testng.xml File
404(1)
Extending the Person Class
404(17)
Refactor
409(3)
Invalid Dates
412(2)
Date Validation
414(3)
The State of the Classes
417(3)
Where Now?
420(1)
Summary
421(4)
Self-review Questions
421(1)
Programming Exercises
422(1)
Challenges
423(2)
Test-driven Programming Strategies
425(38)
Introduction
426(1)
Getting Started---Searching for Files
427(13)
Real Files vs. Fake Files
430(1)
Using Real Files
430(4)
Reviewing Progress So Far
434(1)
Faking It
435(4)
The Completed FileNameSearch Class
439(1)
The GUI
440(20)
The GUI Layout
441(1)
Testing the GUI Layout
441(4)
The GUI Class
445(4)
Creating the GUI
449(3)
The Select Button
452(2)
Mock Objects
454(3)
The Search Button
457(3)
The Complete Searcher
460(1)
Summary
461(2)
Self-review Questions
461(1)
Programming Exercises
462(1)
Challenges
462(1)
Programming Tools
463(38)
Introduction
464(1)
Project Structure
464(4)
The src Directory
465(1)
The build Directory
466(1)
The lib Directory
466(1)
The doc and javadoc Directories
466(1)
The reports Directory
466(1)
The deploy Directory
467(1)
Keeping Files Safe
467(1)
Ant---The Build Tool
468(13)
Ant Overview
468(4)
The project Element
472(1)
The Properties
472(1)
The path Elements
473(1)
The clean Target
474(1)
The init Target
475(1)
The compile.classes Target
475(1)
The compile.tests Target
476(1)
The test Target
477(1)
The run Target
478(1)
The javadoc Target
478(1)
The deploy Target
479(1)
The all Target
480(1)
Using the Build File
480(1)
Version Control
481(9)
CVS and Subversion
481(1)
Subversion Repositories
482(1)
Starting a Project
483(1)
Checking Out a Revision
483(1)
Updating, Checking In and Conflicts
484(2)
Adding, Deleting and Moving
486(1)
Revisions
486(1)
Status and Logs
487(1)
diff
488(1)
Copying and Branching
488(1)
Going Further
489(1)
Integrated Development Environments
490(9)
Using an IDE
490(2)
IDEs and Projects
492(3)
GUI Builders
495(1)
The Debugger
495(1)
UML Tools
496(2)
Command Line Tools
498(1)
Project Website
499(1)
Summary
499(2)
Self-review Questions
499(1)
Programming Exercises
500(1)
Challenges
500(1)
Part 3 Case Studies in Developing Programs
501(116)
Introducing the Case Studies
503(4)
Introduction
504(1)
The Case Studies
505(1)
The Presentations of the Case Studies
506(1)
Contacts Book
507(58)
Introduction
508(1)
Wading In
508(1)
Stepping Back---Some Research
509(12)
XML
509(3)
DOM and SAX
512(1)
JDOM and dom4j
512(1)
An Initial Experiment
513(8)
Data Storage
521(14)
An Initial Analysis
522(1)
Initial Design Thinking
522(4)
Making the Design Concrete
526(9)
A GUI Design
535(1)
An Initial Requirements Analysis
535(1)
The Architecture and Design of the GUI
535(1)
Displaying the List of Contacts
536(14)
Mousing Around
536(5)
Displaying Contact Details
541(9)
Menus and Action
550(13)
More to Do
563(2)
Programming Exercises
563(1)
Challenges
564(1)
Pedestian Crossing Simulation
565(52)
Introduction
566(1)
The Initial Problem Specification
566(1)
The Initial Thinking
567(3)
Lights
567(1)
Traffic Lights
567(2)
Pedestrian Lights
569(1)
A First Pass
570(14)
Getting GUI
584(13)
GUIer and GUIer
597(7)
Control... We Have a Problem
604(11)
Onward
615(1)
Summary
616(1)
Programming Exercises
616(1)
Challenges
616(1)
Part 4 The Java Programming Language in Detail
617(202)
A Java Language Reference
619(6)
Introduction
620(1)
Syntax and Semantics
620(1)
The Presentation
621(1)
The Example Programs
621(2)
Summary
623(2)
Variables, Types and Expressions
625(40)
Introduction
626(1)
Comments
626(4)
Identifiers
630(3)
Unicode Escapes
633(1)
Literals
634(2)
Types
636(3)
Primitive Types
636(2)
Reference Types
638(1)
Automatic Type Conversion
638(1)
Scope
639(1)
Variables
640(9)
Declaring Variables
641(1)
Variable Initialization
642(3)
Array Variables
645(4)
Expressions and Operators
649(13)
Primary Expressions
649(2)
Operators
651(11)
Source Files
662(1)
Summary
662(3)
Self-review Questions
663(1)
Programming Exercises
663(2)
Flow Control
665(32)
Introduction
666(1)
Selection
666(9)
The If Statement
666(4)
The Switch Statement
670(5)
Iteration
675(11)
The While Loop
676(3)
The Do Loop
679(1)
The For Loop
680(4)
Checking Loop Behaviour
684(1)
Foreach Loop
685(1)
Transfer Statements
686(8)
Break
686(4)
Continue
690(2)
Return
692(2)
Recursion
694(1)
Summary
695(2)
Self-review Questions
695(1)
Programming Exercises
696(1)
Classes and Packages
697(48)
Introduction
698(1)
Classes
698(22)
The Class Declaration
698(2)
Public, Private and Protected
700(2)
Instance Variables
702(1)
Instance Initializers
703(1)
Static or Class Variables
704(2)
Static Initializers
706(2)
Methods
708(4)
Static or Class Methods
712(2)
Constructors
714(3)
this
717(3)
Top-Level Classes
720(1)
Nested Classes
720(14)
Nested Top-Level Classes
720(3)
Member Classes
723(4)
Local Classes
727(4)
Anonymous Classes
731(3)
Enumerated Types
734(3)
Packages
737(2)
Static Import
739(3)
Summary
742(3)
Self-review Questions
742(1)
Programming Exercises
743(2)
Inheritance and Interfaces
745(42)
Introduction
746(1)
Inheritance
746(29)
Basic Inheritance
746(2)
Private and Protected Keywords and Inheritance
748(2)
Final Classes
750(1)
Method Overriding
751(3)
Final Methods
754(1)
Method Call Expressions
755(7)
Modified Name Lookup for Member Classes
762(1)
Constructors and Inheritance
763(2)
super and Hidden Names
765(2)
Abstract Classes
767(1)
Abstract Methods
768(2)
Methods Inherited from Class Object
770(5)
Interfaces
775(7)
Interface Declaration
777(3)
Implements
780(2)
Annotations
782(2)
Summary
784(3)
Self-review Questions
784(1)
Programming Exercises
785(2)
Exception Handling
787(16)
Introduction
788(12)
Exception Classes
788(2)
Try, Catch and Finally
790(5)
Exception Propagation
795(1)
Throws Declarations
796(2)
Throw
798(2)
Summary
800(3)
Self-review Questions
801(2)
Threads and Concurrency
803(16)
Introduction
804(1)
Class Thread
805(6)
Synchronized Methods
811(5)
Synchronized Statement
816(1)
Summary
817(2)
Self-review Questions
818(1)
Programming Exercises
818(1)
Part 5 Endmatter
819(2)
Appendix A Glossary
821(8)
Appendix B The CRC Method
829(6)
Introduction
829(1)
Basic Concepts
829(1)
CRC Cards
830(1)
CRC Method Process
831(1)
Problems
832(1)
Documentation
832(1)
Design
833(2)
Appendix C The Online Documentation
835(4)
Appendix D Running Java Programs
839(4)
Getting Started
839(1)
Compiling and Running a Program
839(1)
Using Classes Input, FileInput and FileOutput
840(1)
Using Classes DrawFrame and DrawPanel
841(1)
Using CLASSPATH
841(2)
Appendix E Class Input
843(8)
Appendix F Class FileInput
851(2)
Appendix G Class FileOutput
853(4)
Appendix H Class DrawFrame
857(4)
Appendix I Class DrawPanel
861(2)
Appendix J Bibliography
863(4)
Features and Use of Java
863(1)
Unit Testing and Refactoring
864(1)
Object-oriented Analysis, Design and Programming
864(1)
General Programming
865(1)
Algorithms and Data Structures
865(1)
Concurrency and Threads
865(1)
Tools
866(1)
Human--Computer Interaction
866(1)
Index 867

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program