(Ebook) Building Java Programs_ A Back to Basics Approach (2nd Edition) by null pdf download
(Ebook) Building Java Programs_ A Back to Basics Approach (2nd Edition) by null pdf download
https://ebooknice.com/product/building-java-programs-a-back-to-
basics-approach-2nd-edition-34868800
https://ebooknice.com/product/building-java-programs-a-back-to-basics-
approach-5th-edition-11263758
https://ebooknice.com/product/building-java-programs-a-back-to-basics-
approach-5703576
https://ebooknice.com/product/building-java-programs-a-back-to-basics-
approach-55582742
https://ebooknice.com/product/building-java-programs-a-back-to-basics-
approach-7201700
(Ebook) Building Java Programs: A Back to Basics Approach by
Reges, Stuart;Stepp, Marty ISBN 9780134322766, 9781292161686,
0134322762, 129216168X
https://ebooknice.com/product/building-java-programs-a-back-to-basics-
approach-22053668
https://ebooknice.com/product/vagabond-vol-29-29-37511002
https://ebooknice.com/product/back-to-basics-a-complete-guide-to-
traditional-skills-back-to-basics-guides-55133958
https://ebooknice.com/product/back-to-basics-a-video-assisted-7-step-
holistic-approach-to-managing-back-pain-for-those-over-50-34385176
1. Go to http://www.pearsonhighered.com/regesstepp/
3. Your student access code will be sent to you by CourseSmart. On the registration page, enter your student
access code. Do not type the dashes. You can use lower or uppercase letters.
4. Follow the on-screen instructions. If you need help during the online registration process, simply click on
Need Help?
5. Once your personal Login Name and Password are confirmed, you can begin viewing the Companion Web-
site.
To login to the website for the first time after you’ve registered:
Follow step 1 to return to the Companion Website. Then, follow the prompts for "Returning Users" to enter
your Login Name and Password.
Note to Instructors: For access to the Instructor Resource Center, contact your Pearson Representative.
IMPORTANT: The access code on this page can only be used once to establish a subscription to the Com-
panion Website for Building Java Programs: A Back to Basics Approach. If this access code has already been
redeemed, it will no longer be valid. If this is the case, you can purchase a subscription by going to the http://
www.pearsonhighered.com/regesstepp/ website and selecting "Get Access."
Building Java Programs
A Back to Basics Approach
Addison-Wesley
Boston Columbus Indianapolis New York San Francisco Upper Saddle River
Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto
Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo
Editor in Chief: Michael Hirsch Senior Media Buyer: Ginny Michaud
Acquisitions Editor: Matt Goldstein Text Designer: Susan Raymond
Editorial Assistant: Chelsea Bell Cover Designer: Elena Sidorova
Managing Editor: Jeffrey Holcomb Cover Image: © Roine Magnusson / Getty Images
Senior Production Project Manager: Marilyn Lloyd Interior CO Image: Stone Wall © Corbis
Media Producer: Katelyn Boller Project Management: Brendan Short/Aptara®, Inc.
Director of Marketing: Margaret Waples Full Service Vendor: Aptara®, Inc.
Marketing Coordinator: Kathryn Ferranti Printer/Binder: Edwards Brothers
Senior Manufacturing Buyer: Carol Melville Cover Printer: Lehigh-Phoenix Color/Hagerstown
Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on
appropriate page within text.
The interior of this book was set in QuarkXpress 6.5 with ETM v2. The basal text is set in Times.
Copyright © 2011, 2008 Pearson Education, Inc., publishing as Addison-Wesley. All rights reserved. Manufactured in
the United States of America. This publication is protected by Copyright, and permission should be obtained from the
publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means,
electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s) to use material from this work,
please submit a written request to Pearson Education, Inc., Permissions Department, 501 Boylston Street, Suite 900,
Boston, Massachusetts 02116.
Many of the designations by manufacturers and seller to distinguish their products are claimed as trademarks. Where
those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been
printed in initial caps or all caps.
10 9 8 7 6 5 4 3 2 1— EB—14 13 12 11 10
Addison-Wesley
is an imprint of
The newly revised Building Java Programs textbook is designed for use in an intro-
ductory course in computer science. The new chapters in this edition will make it use-
ful in a more advanced course in computer science as well. We have class-tested it
with thousands of undergraduates at the University of Washington, most of whom
were not computer science majors.
Introductory computer science courses have a long history at many universities of
being “killer” courses with high failure rates. But as Douglas Adams says in The
Hitchhiker’s Guide to the Galaxy, “Don’t panic.” Students can master this material if
they can learn it gradually. The introductory courses at the University of Washington
are experiencing record enrollments and other schools that have adopted our textbook
report that students are succeeding with our approach.
Since the publication of our first edition, there has been a movement toward the
“objects later” approach that we have championed (as opposed to the “objects early”
approach). We know from years of experience that a broad range of scientists, engi-
neers, and others can learn how to program in a procedural manner. Once we have
built a solid foundation of procedural techniques, we turn to object-oriented pro-
gramming. By the end of the course, students will have learned about both styles of
programming.
Here are some of the changes that we have made in the second edition:
• Three new chapters. We have created three new chapters that extend the
coverage of the book, using material that we present in our second course in
computer science. Chapter 15 explores the issues that arise in the course of
implementing a robust and powerful collection class. Chapter 16 explores pro-
gramming with linked lists, and Chapter 17 explores programming with binary
trees.
• Improved case studies. Chapters 6 and 7 contain new case studies that are more
interesting than those included in the first edition. The other case studies throughout
the textbook have been expanded to better explain subtle points with which students
often struggle.
• Reorganization of “using objects” material. Material in Chapters 3, 4, and 6
has been reorganized into a new section in Chapter 7 on “reference semantics.”
We have found that this approach works better for explaining these important
concepts.
iii
iv Preface
The following features have been retained from the first edition:
The Layers
Programming
Chapter Control flow Data techniques Input/Output
Chapters 1–6 are designed to be worked through in order, with greater flexibil-
ity of study then beginning in Chapter 7. Chapter 6 may be skipped, although the
case study in Chapter 7 involves reading from a file, a topic that is covered in
Chapter 6.
vi Preface
Chapters 1–6
Programming Fundamentals
Chapter 7 Chapter 8
Arrays Classes
Chapter 12 Chapter 9
Recursion Inheritance and Interfaces
Chapter 11
Java Collections Framework
Chapter 15
Implementing a Collection Class
Chapter 16
Linked Lists
Chapter 17
Binary Trees
Supplements
Answers to all self-check problems appear in Appendix A. In addition, students can
access the following resources at http://www.pearsonhighered.com/regesstepp/ or our
web site at http://www.buildingjavaprograms.com/:
• Source code and data files for all case studies and other complete program
examples.
• The DrawingPanel class used in the optional graphics Supplement 3G.
• The Practice-It! web programming practice system.
Preface vii
Instructors can access the following resources from our web site at http://www.
buildingjavaprograms.com/:
Practice-It!
For the second edition, we have written a web application called Practice-It! that is
available from our web site at http://www.buildingjavaprograms.com/practice/. This
application allows students to practice the exercises from the book and from our
introductory programming courses. The system presents a menu of exercises and
allows the user to type a solution to a problem and submit it to our server. The system
will test the solution and report whether the code solves the problem correctly. For
self-checks and University of Washington problems, you may also view the instructor’s
solutions. Many of our own students have reported that they find this system useful,
especially when they are studying for exams.
VideoNotes
We have recorded a series of instructional videos to accompany the second edition of
the textbook. They are available at http://www.pearsonhighered.com/regesstepp.
Roughly 3–4 videos are posted for each chapter. An icon in the margin of the page
indicates when a VideoNote is available for a given topic. In each video, we spend
5–15 minutes walking through a particular concept or problem, talking about the chal-
lenges and methods necessary to solve it. These videos make a good supplement to the
instruction given in lecture classes and in the textbook. Your new copy of the second
edition has an access code that will allow you to view the videos.
Acknowledgments
First, we would like to thank the many students and teaching assistants who have used
and commented on early drafts of this text. We could not have written this book with-
out their input. Special thanks go to Hélène Martin, who pored over early versions of
these chapters to find errors and to identify rough patches that needed work. We would
viii Preface
also like to thank instructor Benson Limketkai for spending many hours performing a
technical proofread of the second edition.
Second, we would like to thank the talented pool of reviewers who guided us in
the process of creating this textbook:
x
Brief Contents
Preface iii
Chapter 1 Introduction to Java Programming 1
Chapter 2 Primitive Data and Definite Loops 61
Chapter 3 Introduction to Parameters and Objects 132
Supplement 3G Graphics (Optional) 188
Chapter 4 Conditional Execution 226
Chapter 5 Program Logic and Indefinite Loops 301
Chapter 6 File Processing 373
Chapter 7 Arrays 425
Chapter 8 Classes 500
Chapter 9 Inheritance and Interfaces 555
Chapter 10 ArrayLists 628
Chapter 11 Java Collections Framework 679
Chapter 12 Recursion 718
Chapter 13 Searching and Sorting 774
Chapter 14 Graphical User Interfaces 822
Chapter 15 Implementing a Collection Class 886
Chapter 16 Linked Lists 929
Chapter 17 Binary Trees 981
Appendix A Answers to Self-Check Problems 1035
Appendix B Java Summary 1107
Appendix C Javadoc Comments and the Java API Specification 1122
Appendix D Additional Java Syntax 1128
Index 1137
xi
This page intentionally left blank
Contents
Preface iii
xiii
xiv Contents
2.2 Variables 72
Assignment/Declaration Variations 77
String Concatenation 80
Increment/Decrement Operators 82
Variables and Mixing Types 85
C. — Pittura.
Tavola 72.
Ved. Melani, Pittura. Milano, Hoepli 2ª. edizione, tav. IX.
III. I dipinti celebri a noi rimasti.
Tavola 73.
Ved. Melani, op. cit., fig. 11, pag. 43.
Parete dipinta di una casa romana
messa allo scoperto nella Villa Farnesina (Museo Nazionale
alle Terme).
Tavola 74.
Ved. Melani, Pittura, op. cit., 2ª ediz., tav. XI.
Tavola 75.
Ved. Melani, Pittura, Milano, Hoepli, 2ª ediz., tav. III.
Scene della vita di palestra
Dipinte in un pavimento a mosaico rinvenuto a Frascati
(Tusculum).
Tavola 76.
Ved. Melani, Pittura, op. cit., 2ª ediz., tav. XIV.
Parete dipinta nella casa della “Parete nera„ a Pompei.
Motivo parietale del triclinio.
Tavola 77.
Ved. Melani, Pittura, op. cit., 2ª ediz., tav. XII.
Scena di paesaggio antico.
Dipinto rinvenuto sull'Esquilino (ora nella Biblioteca
Vaticana a Roma).
Tavola 79.
Ved. Melani, Architettura, IIIª. ediz., pag. 145 e fig. 73.
Casa dell'edile Pansa a Pompei.
(Sezione longitudinale)
Tavola 80.
Ved. Melani, Architettura, op. cit., IIIª. ediz., pag. 147, fig. 74.
Atrio della casa di Sallustio
a Pompei.
Tavola 81.
Ved. Melani, Architettura, op. cit., pag. 148, fig. 75.
Il “Septizonium„ di Settimio Severo.
Edificio decorativo sul Palatino (ricostruzione).
Tavola 82.
Il Settizonio fu distrutto sotto Sisto V. Ved. Schneider, Das alte Rom,
XIII, 9; Cfr. 46º Berliner Winckelmannsprogramm. di Hülsen-Gräf (tav.
IV).
TERZO PERIODO.
A. — Architettura.
Tavola 83.
Ved. Melani, Architettura cit., pag. 123, fig. 67.
Pianta delle Terme di Caracalla a Roma.
Tavola 84.
Ved. Melani, Architettura cit., pag. 121, fig. 66; cfr. idem. tav. XI
(“Frigidarium„ delle Terme di Caracalla a Roma, secondo una ricostruzione
ideale).
Tavola 85.
Ved. Melani, Architettura, cit., pag. 177, fig. 76.
Tavola 86. — Ved. Strack, Baudenkmäler des alten Rom, tav. 32; cfr.
Borsari, Topografia di Roma antica, Milano, Hoepli, 1897, pag. 371-372.
Pianta della Basilica di Costantino a Roma.
Tavola 87.
Ved. Melani, Architettura, pag. 115, fig. 64.
B. — Plastica.
C. — Pittura.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com