Test Bank for Java Software Solutions: Foundations of Program Design, 7/E 7th Edition John Lewis, William Loftus

Original price was: $35.00.Current price is: $26.50.

Test Bank for Java Software Solutions: Foundations of Program Design, 7/E 7th Edition John Lewis, William Loftus Digital Instant Download

Category:

This is completed downloadable of Test Bank for Java Software Solutions: Foundations of Program Design, 7/E 7th Edition John Lewis, William Loftus

Product Details:

ISBN 10:  0132149184

ISBN13: 978-0132149181

Author:  John Lewis, William Loftus

Java Software Solutions teaches a foundation of programming techniques to foster well-designed object-oriented software. Heralded for its integration of small and large realistic examples, this worldwide best-selling text emphasizes building solid problem-solving and design skills to write high-quality programs.

 

Table of Content:

Chapter 1 Introduction 1
1.1 Computer Processing 2
Software Categories 3
Digital Computers 5
Binary Numbers 7
1.2 Hardware Components 10
Computer Architecture 10
Input/Output Devices 12
Main Memory and Secondary Memory 13
The Central Processing Unit 17
1.3 Networks 19
Network Connections 19
Local-Area Networks and Wide-Area Networks 21
The Internet 22
The World Wide Web 24
Uniform Resource Locators 25
1.4 The Java Programming Language 26
A Java Program 27
Comments 29
Identifiers and Reserved Words 31
White Space 33
1.5 Program Development 35
Programming Language Levels 36
Editors, Compilers, and Interpreters 38
Development Environments 40
Syntax and Semantics 41
Errors 42
1.6 Object-Oriented Programming 43
Problem Solving 44
Object-Oriented Software Principles 45
Chapter 2 Data and Expressions 61
2.1 Character Strings 62
The print and printlnMethods 62
String Concatenation 64
Escape Sequences 66
2.2 Variables and Assignment 69
Variables 69
The Assignment Statement 71
Constants 73
2.3 Primitive Data Types 73
Integers and Floating Points 74
Characters 75
Booleans 77
2.4 Expressions 77
Arithmetic Operators 78
Operator Precedence 78
Increment and Decrement Operators 83
Assignment Operators 84
2.5 Data Conversion 85
Conversion Techniques 87
2.6 Interactive Programs 88
The ScannerClass 88
2.7 Graphics 93
Coordinate Systems 94
Representing Color 95
xx CONTENTS
CONTENTS xxi
2.8 Applets 96
Executing Applets Using the Web 98
2.9 Drawing Shapes 99
The GraphicsClass 99
Chapter 3 Using Classes and Objects 113
3.1 Creating Objects 114
Aliases 116
3.2 The StringClass 118
3.3 Packages 121
The import Declaration 122
3.4 The RandomClass 124
3.5 The MathClass 127
3.6 Formatting Output 130
The NumberFormatClass 130
The DecimalFormatClass 133
The printfMethod 135
3.7 Enumerated Types 135
3.8 Wrapper Classes 138
Autoboxing 141
3.9 Components and Containers 141
Frames and Panels 142
3.10 Nested Panels 145
3.11 Images 148
xxii CONTENTS
Chapter 4 Writing Classes 155
4.1 Anatomy of a Class 156
Instance Data 161
UML Class Diagrams 162
4.2 Encapsulation 163
Visibility Modifiers 164
Accessors and Mutators 165
4.3 Anatomy of a Method 166
The returnStatement 167
Parameters 169
Local Data 170
Bank Account Example 171
4.4 Constructors Revisited 175
4.5 Graphical Objects 175
4.6 Graphical User Interfaces 184
4.7 Buttons 185
4.8 Text Fields 189
Chapter 5 Conditionals and Loops 201
5.1 Boolean Expressions 202
Equality and Relational Operators 203
Logical Operators 204
5.2 The ifStatement 207
The if-elseStatement 209
Using Block Statements 212
The Conditional Operator 217
Nested ifStatements 218
CH004_TOC.qxd 4/7/04 5:56 PM Page xxii
CONTENTS xxiii
5.3 Comparing Data 220
Comparing Floats 220
Comparing Characters 221
Comparing Objects 222
5.4 The switchStatement 223
5.5 The whileStatement 227
Infinite Loops 232
Nested Loops 234
Other Loop Controls 237
5.6 Iterators 238
Reading Text Files 239
5.7 The doStatement 242
5.8 The forStatement 245
Iterators and forLoops 249
Comparing Loops 251
5.9 Drawing with Loops and Conditionals 251
5.10 Determining Event Sources 254
5.11 Dialog Boxes 260
5.12 More Button Components 263
Check Boxes 264
Radio Buttons 267
xxiv CONTENTS
Chapter 6 Object-Oriented Design 287
6.1 Software Development Activities 288
6.2 Identifying Classes and Objects 289
Assigning Responsibilities 291
6.3 Static Class Members 291
Static Variables 292
Static Methods 292
6.4 Class Relationships 296
Dependency 296
Dependencies Among Objects of the Same Class 296
Aggregation 303
The thisReference 305
6.5 Interfaces 309
The Comparable Interface 315
The IteratorInterface 316
6.6 Enumerated Types Revisited 316
6.7 Method Design 319
Method Decomposition 320
Method Parameters Revisited 325
6.8 Method Overloading 328
6.9 Testing 333
Reviews 334
Defect Testing 334
6.10 GUI Design 336
CONTENTS xxv
6.11 Layout Managers 337
Flow Layout 339
Border Layout 344
Grid Layout 348
Box Layout 350
6.12 Borders 354
6.13 Containment Hierarchies 358
Chapter 7 Arrays 369
7.1 Array Elements 370
7.2 Declaring and Using Arrays 371
Bounds Checking 373
Alternate Array Syntax 379
Initializer Lists 379
Arrays as Parameters 380
7.3 Arrays of Objects 381
7.4 Command-Line Arguments 392
7.5 Variable Length Parameter Lists 394
7.6 Two-Dimensional Arrays 398
Multidimensional Arrays 402
7.7 The ArrayListClass 403
Specifying an ArrayList Element Type 404
ArrayListEfficiency 406
7.8 Polygons and Polylines 407
The PolygonClass 408
xxvi CONTENTS
7.9 Mouse Events 412
7.10 Key Events 420
Chapter 8 Inheritance 437
8.1 Creating Subclasses 438
The protectedModifier 443
The superReference 444
Multiple Inheritance 448
8.2 Overriding Methods 449
Shadowing Variables 451
8.3 Class Hierarchies 452
The ObjectClass 454
Abstract Classes 455
Interface Hierarchies 457
8.4 Visibility 458
8.5 Designing for Inheritance 461
Restricting Inheritance 462
8.6 The Component Class Hierarchy 463
8.7 Extending Adapter Classes 465
8.8 The TimerClass 469
CONTENTS xxvii
Chapter 9 Polymorphism 481
9.1 Late Binding 482
9.2 Polymorphism via Inheritance 483
9.3 Polymorphism via Interfaces 496
9.4 Sorting 498
Selection Sort 498
Insertion Sort 505
Comparing Sorts 506
9.5 Searching 507
Linear Search 507
Binary Search 511
Comparing Searches 513
9.6 Designing for Polymorphism 513
9.7 Event Processing 514
9.8 File Choosers 515
9.9 Color Choosers 518
9.10 Sliders 521
Chapter 10 Exceptions 531
10.1 Exception Handling 532
10.2 Uncaught Exceptions 533
10.3 The try-catchStatement 534
The finallyClause 537
xxviii CONTENTS
10.4 Exception Propagation 538
10.5 The Exception Class Hierarchy 541
Checked and Unchecked Exceptions 544
10.6 I/O Exceptions 545
10.7 Tool Tips and Mnemonics 549
10.8 Combo Boxes 556
10.9 Scroll Panes 562
10.10 Split Panes 564
Chapter 11 Recursion 575
11.1 Recursive Thinking 576
Infinite Recursion 577
Recursion in Math 577
11.2 Recursive Programming 578
Recursion vs. Iteration 581
Direct vs. Indirect Recursion 581
11.3 Using Recursion 582
Traversing a Maze 582
The Towers of Hanoi 588
11.4 Recursion in Graphics 593
Tiled Pictures 593
Fractals 596
CONTENTS xxix
Chapter 12 Collections 611
12.1 Collections and Data Structures 612
Separating Interface from Implementation 612
12.2 Dynamic Representations 613
Dynamic Structures 613
A Dynamically Linked List 614
Other Dynamic List Representations 619
12.3 Linear Data Structures 621
Queues 621
Stacks 622
12.4 Non-Linear Data Structures 624
Trees 625
Graphs 626
12.5 The Java Collections API 628
Generics 628
Appendix A Glossary 639
Appendix B Number Systems 665
Appendix C The Unicode Character Set 673
Appendix D Java Operators 677
Appendix E Java Modifiers 683
Appendix F Java Coding Guidelines 687
Appendix G Java Applets 693
xxx CONTENTS
Appendix H Regular Expressions 695
Appendix I JavaDoc 697
Appendix J The PaintBox Project 703
Appendix K GUI Events 715
Appendix L Java Syntax 719
Appendix M The Java Class Library 733
Index 893
Preface
Welcome to the Fifth Edition of Java Software Solutions, Foundations of
Program Design. We are pleased that this book has served the needs of so many
students and faculty over the years. This edition is designed to further enhance
the pedagogy of introductory computing.
What's New in the Fifth Edition
The overall vision of the book has not changed significantly from that of the 
third
edition. The emphasis remains on presenting underlying core concepts. The
Graphics Track sections in each chapter still segregate the coverage of graphics
and graphical user interfaces. The casual writing style and entertaining examples
still rule the day.
The changes made for this edition are designed to permeate and reinforce the
pedagogy of the material. These changes also address some of the trends that are
happening in many Java programming courses. Specifically:
The discussions and examples fully embrace the Java 2 Standard Edition 5.0,
including coverage of:
> The standard Scanner class, which simplifies keyboard input and parsing.
> Enumerated types.
> Autoboxing, which automatically converts primitives to wrapper objects
and vice versa.
> Variable length parameter lists.
> The enhanced for loop, which facilitates iterating over a collection.
> Generic types, which facilitate the definition of collection classes.
We provide a smoother evolution of object-oriented concepts, including a brief
introduction to the most essential elements of writing classes prior to covering
conditionals and loops. We incorporate class examples into all remaining chapters,
adding key aspects of class design as appropriate.
We place a stronger emphasis on object-oriented design, including techniques
for identifying classes, objects, and their relationships.
We have reorganized the flow of graphical user interface (GUI) topics into a
more logical order throughout the Graphics Track sections of each chapter. The
topics from the third edition's "catch all" GUI chapter have been integrated
throughout the text.
We present most example programs dealing with GUIs and graphics as framebased
Java applications instead of applets. Details of applets are now provided in
an appendix.
The reference material in the appendices has been augmented with new topics,
including an overview of GUI events and a summary of regular expressions for
parsing using the Scanner class.
A whole suite of new and improved supplements is available with this edition.
The supplements are discussed in detail later in the preface.
Cornerstones of the Text
This text is based on the following basic ideas that we believe make for a sound
introductory text:
> True object-orientation. A text that really teaches a solid object-oriented
approach must use what we call object-speak. That is, all processing
should be discussed in object-oriented terms. That does not mean, however,
that the first program a student sees must discuss the writing of
multiple classes and methods. A student should learn to use objects before
learning to write them. This text uses a natural progression that culminates
in the ability to design real object-oriented solutions.
> Sound programming practices. Students should not be taught how to program;
they should be taught how to write good software. There's a
difference. Writing software is not a set of cookbook actions, and a good
program is more than a collection of statements. This text integrates practices
that serve as the foundation of good programming skills. These
practices are used in all examples and are reinforced in the discussions.
Students learn how to solve problems as well as how to implement solutions.
We introduce and integrate basic software engineering techniques
throughout the text.
> Examples. Students learn by example. This text is filled with fully implemented
examples that demonstrate specific concepts. We have intertwined
small, readily understandable examples with larger, more realistic ones.
There is a balance between graphics and nongraphics programs.
> Graphics and GUIs. Graphics can be a great motivator for students, and
their use can serve as excellent examples of object-orientation. As such,
we use them throughout the text in a well-defined set of sections that we
call the Graphics Track. This coverage includes the use of event processing
and GUIs. Students learn to build GUIs in the appropriate way by using a
natural progression of topics. The Graphics Track can be avoided entirely
for those who do not choose to use graphics.
Paths Through the Text
This book is designed to be flexible, so that instructors can tailor its 
presentation
to the needs of their students. Instructors can take a variety of paths through 
the
text. Graphics can be emphasized or deemphasized as desired.
Chapter Breakdown
Chapter 1 (Introduction) introduces computer systems in general, including basic
architecture and hardware, networking, programming, and language translation.
Java is introduced in this chapter, and the basics of general program development,
as well as object-oriented programming, are discussed. This chapter contains
broad introductory material that can be covered while students become familiar
with their development environment.
Chapter 2 (Data and Expressions) explores some of the basic types of data
used in a Java program and the use of expressions to perform calculations. It 
discusses
the conversion of data from one type to another, and how to read input
interactively from the user with the help of the standard Scanner class.
Chapter 3 (Using Classes and Objects) explores the use of predefined classes
and the objects that can be created from them. Classes and objects are used to
manipulate character strings, produce random numbers, perform complex 
calculations,
and format output. Enumerated types are also discussed.
Chapter 4 (Writing Classes) explores the basic issues related to writing classes
and methods. Topics include instance data, visibility, scope, method parameters,
and return types. Encapsulation and constructors are covered as well. Some of the
more involved topics are deferred to or revisited in Chapter 6.
Chapter 5 (Conditionals and Loops) covers the use of boolean expressions to
make decisions. All related statements for conditionals and loops are discussed,
including the enhanced version of the for loop. The Scanner class is revisited for
iterative input parsing and reading text files.
Chapter 6 (Object-Oriented Design) reinforces and extends the coverage of
issues related to the design of classes. Techniques for identifying the classes 
and
objects needed for a problem and the relationships among them are discussed.
This chapter also covers static class members, interfaces, and the design of 
enumerated
type classes. Method design issues and method overloading are also
discussed.
Chapter 7 (Arrays) contains extensive coverage of arrays and array processing.
Topics include command-line arguments, variable length parameter lists, and
multidimensional arrays. The ArrayList class and its use as a generic type is
explored as well.
Chapter 8 (Inheritance) covers class derivations and associated concepts such
as class hierarchies, overriding, and visibility. Strong emphasis is put on the
proper use of inheritance and its role in software design.
Chapter 9 (Polymorphism) explores the concept of binding and how it relates
to polymorphism. Then we examine how polymorphic references can be accomplished
using either inheritance or interfaces. Sorting is used as an example of
polymorphism. Design issues related to polymorphism are examined as well.
Chapter 10 (Exceptions) explores the class hierarchy from the Java standard
library used to define exceptions, as well as the ability to define our own 
exception
objects. We also discuss the use of exceptions when dealing with input and
output, and examine an example that writes a text file.
Chapter 11 (Recursion) covers the concept, implementation, and proper use of
recursion. Several examples from various domains are used to demonstrate how
recursive techniques make certain types of processing elegant.
Chapter 12 (Data Structures) introduces the idea of a collection and its 
underlying
data structure. Abstraction is revisited in this context and the classic data
structures are explored. Generic types are introduced as well. This chapter serves
as an introduction to a CS2 course.
Supplements
A variety of supplemental materials is available for this text. The following
resources are available for all students at www.aw-bc.com/cssupport:
> Source code for all the programs in the text.
> Various Java development environments; these are also on the CD in the
back of this book.
> The Keyboard class, for those who want access to the author-provided
input class that was used in previous editions of the book. In this edition,
it has been supplanted by the new standard Scanner class.
> Lab manual; lab exercises are designed to accompany the topic progression
in the text.
> Addison-Wesley's CodeMate; an online environment that brings the text
to life. A free subscription, included on the card in the front of this text,
allows you to work with many of the text's Code Listings and
Programming Projects to improve your programming skills.
In addition, the following supplements are available to qualified instructors.
Please contact your Addison-Wesley sales representative, or send e-mail to
[email protected], for information on how to access them:
> Presentation Slides; in PowerPoint.
> Solutions; includes solutions to all exercises and programming projects.
> Test Bank in powerful test generator software; includes a wealth of free
response, multiple choice, and true/false type questions.
> Lab Manual; lab exercises are designed to accompany the topic progression
in the text. A printed version of this manual is also available.
Acknowledgments
We are most grateful to the faculty and students from around the world who have
provided their feedback on previous editions of this book. We are pleased to see
the depth of the faculty's concern for their students and the students' thirst for
knowledge. Your comments and questions are always welcome.
We stand in awe of the talent and heroic effort demonstrated by the team at
Addison-Wesley. Michael Hirsch, our editor, has amazing insight and commitment.
Susan Hartman Sullivan has been a brilliant guiding force since this book's
inception. We thank Marketing Manager Michelle Brown and Marketing
Coordinator Lesly Hershman for making sure that instructors understand the
pedagogical advantages of the text. The cover and interior design were designed
by the skilled talents of Joyce Wells. Jeff Holcomb led the amazing production
effort given completely unreasonable time constraints. The Addison-Wesley folks
are supported by the phenomenal team at Argosy Publishing, including Daniel
Rausch and Edalin Michael. We thank all of these people for ensuring that this
book met the highest quality standards.
Special thanks go to the following people who provided valuable advice to us
about this edition via their participation in focus groups, interviews, and 
reviews:
Robert Burton; Brigham Young University; Robert Cohen; University of
Massachusetts, Boston; Christopher Eliot; University of Massachusetts,
Amherst; Matt Evett; Eastern Michigan University; James Heliotis; Rochester
Institute of Technology; Blayne Mayfield; Oklahoma State University; Carolyn
Schauble; Colorado State University; and Faye Navabi-Tadayon; Arizona State
University.
The reviewers of previous editions of this text, as well as many other instructors
and friends, have provided valuable feedback. They include:
Lewis Barnett University of Richmond
Tom Bennet Mississippi College
Gian Mario Besana DePaul University
Hans-Peter Bischof Rochester Institute of Technology
Robert Burton Brigham Young University
James Cross Auburn University
Eman El-Sheikh University of West Florida
John Gauch University of Kansas
Chris Haynes Indiana University
Laurie Hendren McGill University
Mike Higgs Austin College
Karen Kluge Dartmouth College
Jason Levy University of Hawaii
Peter MacKenzie McGill University
Blayne Mayfield Oklahoma State University
Lawrence Osborne Lamar University
Barry Pollack City College of San Francisco
B. Ravikumar University of Rhode Island
David Riley University of Wisconsin (La Crosse)
Jerry Ross Lane Community College
Carolyn Schauble Colorado State University
Arjit Sengupta Georgia State University
Vijay Srinivasan JavaSoft, Sun Microsystems, Inc.
Katherine St. John Lehman College, CUNY
Ed Timmerman University of Maryland, University College
Shengru Tu University of New Orleans
Paul Tymann Rochester Institute of Technology
John J. Wegis JavaSoft, Sun Microsystems, Inc.
Linda Wilson Dartmouth College
David Wittenberg Brandeis University
Wang-Chan Wong California State University (Dominguez Hills)
Thanks also go to my colleagues at Villanova University who have provided so
much wonderful feedback. They include Bob Beck, Cathy Helwig, Dan Joyce,
Anany Levitin, Najib Nadi, Beth Taddei, and Barbara Zimmerman.
Special thanks go to Pete DePasquale of The College of New Jersey for the
design and evolution of the PaintBox project, as well as the original Java Class
Library appendix.
Many other people have helped in various ways. They include Ken Arnold,
Kevin Henry, John Loftus, Sebastian Niezgoda, Sammy Perugini, and Tim
Herman (Dexter Systems). Our apologies to anyone we may have forgotten.
The ACM Special Interest Group on Computer Science Education (SIGCSE) is
a tremendous resource. Their conferences provide an opportunity for educators
from all levels and all types of schools to share ideas and materials. If you are 
an
educator in any area of computing and are not involved with SIGCSE, you're
missing out.


People Also Search:

java software solutions foundations of program design 7/e

java software solutions foundations of program design 7/e 7th edition

java software solutions foundations of program design 7/e 7th edition download scribd

java software solutions foundations of program design 7/e 7th edition test bank download pdf