9780471692645

0471692646

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.

Get Rewarded for Ordering Your Textbooks!Enroll Now

Customer ReviewsRead Reviews

Write a Review

List Price: $137.75

Marketplace

$1.64

More Prices

Summary

This version of the book uses the latest Java technology, Java 2 Standard Edition Version 5.0 (J2SE V. 5.0), otherwise known as "Version 5.0."In the software engineering industry, the most important work takes place before the first line of code is written. That\'s why Koffman and Wolfgang reinforce the message "think, then code" throughout their text. They embed the design and implementation of data structures into the practice of sound software engineering principles, introduced in early chapters and reinforced through the inclusion of case studies adapted to focus on the selection and/or design of Java classes.Over 20 case studies follow a five-step process (problem specification, analysis, design, implementation, and testing) that has been adapted to object-oriented programming to focus on the selection and/or design of Java classes. Students are encouraged to think critically about the five-step process and use it in an iterative fashion. Several problems have extensive discussions of testing and include methods that automate the testing process.Students gain an understanding of why different data structures are needed, the applications they are suited for, and the advantages and disadvantages of their possible implementations. Several problems have extensive discussions of testing and include methods that automate the testing process.Students who complete the text will be able to use the Java Collections framework and understand how it is implemented.Ultimately, Koffman and Wolfgang communicate the approach of "preparation breeds success" when it comes to Data Structures.

Table of Contents

Preface

vii

Chapter 1 Introduction to Software Design

1

(58)

1.1 The Software Life Cycle

2

(9)

Software Life Cycle Models

3

(2)

Software Life Cycle Activities

5

(1)

Requirements Specification

6

(1)

Analysis

7

(1)

Design

8

(3)

Exercises for Section 1.1

11

(1)

1.2 Abstraction Helps Manage Complexity

11

(2)

Procedural Abstraction

11

(1)

Data Abstraction

12

(1)

Information Hiding

12

(1)

Exercises for Section 1.2

13

(1)

1.3 Abstract Data Types, Interfaces, and Pre- and Postconditions

13

(8)

Interfaces

14

(2)

The implements Clause

16

(1)

Declaring a Variable of an Interface Type

17

(1)

An Interface for a Telephone Directory Class

17

(1)

Javadoc Comments

17

(1)

Contracts and Interfaces

18

(1)

Preconditions and Postconditions

19

(1)

Exercises for Section 1.3

20

(1)

1.4 Requirements Analysis, Use Cases, and Sequence Diagrams

21

(7)

Case Study: Designing a Telephone Directory Program

21

(6)

Exercises for Section 1.4

27

(1)

1.5 Design of an Array-Based Phone Directory

28

(7)

Case Study: Designing a Telephone Directory Program (continued)

28

(7)

Exercises for Section 1.5

35

(1)

1.6 Implementing and Testing the Array-Based Phone Directory

35

(7)

Case Study: Designing a Telephone Directory Program (continued)

35

(7)

Exercises for Section 1.6

42

(1)

1.7 Two Classes That Implement PDUserlnterface

42

(12)

Case Study: Designing a Telephone Directory Program (continued)

43

(11)

Exercises for Section 1.7

54

(1)

Chapter Review, Exercises, and Programming Projects

54

(5)

Chapter 2 Program Correctness and Efficiency

59

(66)

2.1 Program Defects and "Bugs"

60

(7)

Syntax Errors

61

(1)

Run-time Errors or Exceptions

61

(4)

Logic Errors

65

(1)

Exercises for Section 2.1

66

(1)

2.2 The Exception Class Hierarchy

67

(4)

Exercises for Section 2.2

70

(1)

2.3 Catching and Handling Exceptions

71

(7)

Uncaught Exceptions

71

(1)

The try-catch-finally Sequence

71

(7)

Exercises for Section 2.3

78

(1)

2.4 Throwing Exceptions

78

(8)

The throws Clause

78

(2)

The throw Statement

80

(3)

Catching Exceptions in the Phone Directory Application

83

(2)

Exercises for Section 2.4

85

(1)

2.5 Testing Programs

86

(14)

Structured Walkthroughs

87

(1)

Levels and Types of Testing

87

(2)

Preparations for Testing

89

(1)

Testing Tips for Program Systems

90

(1)

Developing the Test Data

91

(1)

Testing Boundary Conditions

91

(3)

Who Does the Testing?

94

(1)

Stubs

94

(1)

Drivers

95

(1)

Testing a Class

95

(2)

Using a Test Framework

97

(1)

Regression Testing

98

(1)

Integration Testing

98

(1)

Exercises for Section 2.5

99

(1)

2.6 Debugging a Program

100

(5)

Using a Debugger

101

(4)

Exercises for Section 2.6

105

(1)

2.7 Reasoning about Programs: Assertions and Loop Invariants

105

(4)

Assertions

106

(1)

Loop Invariants

106

(2)

Enrichment Topic: The Java assert statement

108

(1)

Exercises for Section 2.7

109

(1)

2.8 Efficiency of Algorithms

109

(10)

Big-O Notation

112

(4)

Comparing Performance

116

(2)

Algorithms with Exponential and Factorial Growth Rates

118

(1)

Exercises for Section 2.8

118

(1)

Chapter Review, Exercises, and Programming Projects

119

(6)

Chapter 3 Inheritance and Class Hierarchies

125

(68)

3.1 Introduction to Inheritance and Class Hierarchies

126

(7)

Is-a Versus Has-a Relationships

128

(1)

A Superclass and a Subclass

128

(1)

Use of this.

129

(1)

Initializing Data Fields in a Subclass

130

(1)

The No-Parameter Constructor

131

(1)

Protected Visibility for Superclass Data Fields

131

(1)

Exercises for Section 3.1

132

(1)

3.2 Method Overriding, Method Overloading, and Polymorphism

133

(5)

Method Overriding

133

(2)

Method Overloading

135

(1)

Polymorphism

136

(1)

Exercises for Section 3.2

137

(1)

3.3 Abstract Classes, Assignment, and Casting in a Hierarchy

138

(5)

Referencing Actual Objects

141

(1)

Abstract Classes and Interfaces

141

(1)

Abstract Class Number and the Java Wrapper Classes

141

(1)

Summary of Features of Actual Classes, Abstract Classes, and Interfaces

142

(1)

Exercises for Section 3.3

143

(1)

3.4 Class Object, Casting, and Cloning

143

(13)

The Method toString

144

(1)

Operations Determined by Type of Reference Variable

144

(1)

Casting in a Class Hierarchy

145

(4)

The Method Object.equals

149

(1)

Cloning

150

(4)

Cloning a Data Structure

154

(1)

Exercises for Section 3.4

155

(1)

3.5 Multiple Inheritance, Multiple Interfaces, and Delegation

156

(4)

Using Multiple Interfaces to Emulate Multiple Inheritance

156

(2)

Implementing Reuse Through Delegation

158

(1)

Exercises for Section 3.5

159

(1)

3.6 Packages and Visibility

160

(3)

Packages

160

(1)

The No-Package-Declared Environment

160

(1)

Package Visibility

161

(1)

Visibility Supports Encapsulation

161

(2)

Exercises for Section 3.6

163

(1)

3.7 A Shape Class Hierarchy

163

(20)

Case Study: Drawing Geometric Figures

164

(18)

Exercises for Section 3.7

182

(1)

3.8 Object Factories

183

(3)

Case Study: Compute Areas and Perimeters of Geometric Shapes

183

(2)

Exercises for Section 3.8

185

(1)

Chapter Review, Exercises, and Programming Projects

186

(7)

Chapter 4 Lists and the Collection Interface

193

4.1 The List Interface and ArrayList Class

194

(7)

The ArrayList Class

195

(2)

Generic Collections

197

(2)

Specification of the ArrayList Class

199

(1)

Exercises for Section 4.1

200

(1)

4.2 Applications of ArrayList

201

(2)

The Phone Directory Application Revisited

201

(1)

Exercises for Section 4.2

202

(1)

4.3 Implementation of an ArrayList Class

203

(6)

The Constructor for Class KWArrayList[E] 204

The add(E anEntry) Method

204

(1)

The add(int index, E anEntry) Method

205

(1)

The set and get Methods

206

(1)

The remove Method

207

(1)

The reallocate Method

207

(1)

Implementing KWArrayList as a Collection of Objects

208

(1)

Performance of the KWArrayList

208

(1)

The Vector Class

208

(1)

Exercises for Section 4.3

209

(1)

4.4 Single-Linked Lists and Double-Linked Lists

209

(13)

A List Node

211

(2)

Connecting Nodes

213

(1)

A Single-Linked List Class

213

(1)

Inserting a Node in a List

214

(1)

Removing a Node

214

(1)

Traversing a Linked List

215

(1)

Double-Linked Lists

216

(3)

A Double-Linked List Class

219

(1)

Circular Lists

219

(1)

Exercises for Section 4.4

220

(2)

4.5 The LinkedList Class and the Iterator, ListIterator, and Iterable Interfaces

222

(8)

The LinkedList Class

222

(1)

The Iterator

222

(1)

The Iterator Interface

223

(2)

The ListIterator Interface

225

(3)

Comparison of Iterator and ListIterator

228

(1)

Conversion Between a ListIterator and an Index

228

(1)

The Enhanced for Statement

228

(1)

The Iterable Interface

229

(1)

Exercises for Section 4.5

229

(1)

4.6 Implementation of a Double-Linked List Class

230

(10)

Implementing the KWLinkedList Methods

231

(1)

A Class that Implements the ListIterator Interface

232

(7)

Inner Classes: Static and Non-Static

239

(1)

Exercises for Section 4.6

239

(1)

4.7 Application of the LinkedList Class

240

(7)

Case Study: Maintaining an Ordered List

240

(7)

Exercises for Section 4.7

247

(1)

4.8 The Collection Hierarchy

247

Common Features of Collections

248

(1)

The AbstractCollection, AbstractList, and AbstractSequentialList Classes