所需积分/C币:16 2014-10-07 05:09:46 6.28MB PDF
收藏 收藏

Java, Java, Java Object-Oriented Problem Solving Third Edition。 全面介绍java面向对象编程。经典的java教学书籍。
Preface to the open source Edition Java, Java, Java, Be was previously published by Pearson Education, Inc The first edition(2000)and the second edition(2003)were published by Prentice-Hall. In 2010 Pearson Education, InC. reassigned the copyright to the authors, and we are happy now to be able to make the book available under an open source license This PDf edition of the book is available under a Creative Com mons Attribution-NoDerivs 3. 0 Unported license, which allows the book to be used and shared(with attribution), but not changed As time permits we hope to be able to provide an extensible version of the book and its contents in the not too distant future Ralph Morelli and ralph Walde- Hartford, CT- February 6, 2012 11 Preface to the Third edition We have designed this third edition of Java, Java, Java to be suitable for a typical introduction to Computer Science( Cs1)course or for a slightly more advanced java as a second language course This edition retains the objects first"approach to programming and problem solving that was characteristic of the first two editions. Throughout the text we emphasize careful coverage of Java language features, introductory programming concepts, and object-oriented design principles The third edition retains many of the features of the first two editions Including e early Introduction of Objects Emphasis on Object Oriented Design(OOD) Unified Modeling Language(UML) Diagrams e Self-study Exercises with Answers Programming, Debugging, and Design Tips From the Java Library sections e Object-Oriented Design sections End-of-Chapter Exercises Companion Web Site, with Power Points and other Resources The In the Laboratory sections from the first two editions have been moved onto the books companion Web Site. Table l shows the Table of Contents for the third edition What's New in the Third edition The third edition has the following substantive changes Although the book retains its emphasis on a running example that is revisited in several chapters, the CyberPet examples have been replaced with a collection of games and puzzle examples. The CyberPet examples from earlier editions will be available on the Companion Web site Table 1: Table of contents for the Third edition apter Topic Chapter Computers, Objects, and Java(revised Chapter 1 Java Program Design and Development Chapter 2 Objects: Defining, Creating, and Using Chapter 3 Methods: Communicating with Objects(revised) Chapter 4 Input/Output: Designing the User Interface(new) Chapter 5 Java Data and Operators Chapter 6 Control Structure Chapter 7 Strings and String Processing Chapter8 Inheritance and Polymorphism(new Chapter 9 Arrays and Array Processing Chapter 10 Exceptions: When Things Go Wrong Chapter 11 Files and Streams Chapter 12 Recursive Problem Solving Chapter 13 G chical user Inte pi Chapter 14 Threads and Concurrent Programming Chapter 15 Sockets and Networking(expanded) Chapter 16 Data Struct Lists, Stacks, and Queues(revised and expanded) Chapters 0(Computers, Objects, and Java)and 1 (ava Program De sign and Development) have been substantially reorganized and rewritten. The new presentation is designed to reduce the pace with which new concepts are introduced. The treatment of object- oriented (OO)and UML concepts has also been simplified, and some of the more challenging Oo topics, such as polymorphism, have been moved to a new chapter 8 ne nev w Java 1.5 class is introduced in Chapter 2 and is used to perform simple input operations Chapter 4(Input/Output: Designing the User Interface) has been completely written. Rather than relying primarily on applet inter faces, as in the second edition, this new chapter provides indepen- dent introductions to both a command-line interface and a graphi- al user interface(GUI). Instructors can choose the type of interface that best suits their teaching style. The command-line interface is b ased on class and is used throughout the rest of the text. The GUI is designed to work with either graphi- cal applications or applets. Both approaches are carefully presented to highlight the fundamentals of user-interface design. The chapter concludes with an optional section that introduces file l/o using the new Class Much of the discussion of inheritance and polymorphism, which was previously woven through the first five chapters in the second edition, has been integrated into a new Chapter 8 An optional graphics track is woven throughout the text. Beginning with simple examples in Chapters I and 2, this track also includes some of the examples that were previously presented in Chapter 10 of the sccond edition Chapter 15, on Sockets and Networking, is expanded to cover some of the more advanced java technologies that have emerged, includ ing servlets and Java Server Pages Chapter 16, on Data Structures, has been refocused on how to use data structures. It makes greater use of Java's Collection Framework, including the and classes and the face. It has been expanded to cover some advanced data structures such as sets, maps, and binary search trees The essentials edition An Essentials edition of the third edition, which will include Chapters 0 12, will be published as a separate title. The Essentials Edition will cover those topics( Chapters 0-9)that are covered in almost all introductory (CSI)courses, but it will also include topics(Exceptions, File I/O, and Recursion) that many csl instructors have requested Why Start with Objects? The Third Edition still takes an objects-early approach to teaching Java, with the assumption that teaching beginners the big picture " early gives them more time to master the principles of object-oriented programming This approach seems now to have gained in popularity as more and more instructors have begun to appreciate the advantages of the object-oriented perspective Object Orientation(OO) is a fundamental problem solving and design concept, not just another language detail that should be relegated to the middle or the end of the book (or course). If oo concepts are introduced late, it is much too easy to skip over them when push comes to shove in th ne course. The first time I taught Java in our CS1 course I followed the same ap- proach I had been taking in teaching C and C++-namely, start with the basic language features and structured programming concepts and then, somewhere around midterm, introduce object orientation. This approach was familiar for it was one taken in most of the textbooks then available in both java and c One problem with this approach was that many students failed to get the big picture. They could understand loops, if-else constructs, and arith- metic expressions, but they had difficulty decomposing a programming problem into a well-organized Java program. Also, it seemed that this procedural approach failed to take advantage of the strengths of Java's object orientation Why teach an object-oriented language if you re goin ng to treat it like c or Pascal? I was reminded of a similar situation that existed when pascal was the predominant CS1 language. Back then the main hurdle for beginners was procedural abstraction - learning the basic mechanisms of procedure call and parameter passing and learning how to design programs as a collec- tion of procedures. Oh! Pascal!, my favorite introductory text, was typical of a"procedures early"approach. It covered procedures and parameters in Chapter 2, right after covering the assignment and I/O constructs in Chapter 1. It then covered program design and organization in Chap ter 3. It didn't get into loops, if-else, and other structured programming concepts until Chapter 4 and beyond e Today, the main hurdle for beginners is the concept of object abstraction ginning programmers must be able to see a program as a collection of interacting objects and must learn how to decompose programming prob lems into well-designed objects. Object orientation subsumes both proce dural abstraction and structured programming concepts from the Pascal days. Teaching objects-early takes a top-down approach to these three im- portant concepts. The sooner you begin to introduce objects and classes, the better the chances that students will master the important principles of object orientation Java is a good language for introducing object orientation. Its object model is better organized than C++. In C++ it is easy to"work around or completely ignore Oo features and treat the language like C In Java there are good opportunities for motivating the discussion of object orien- tation. For example, it's almost impossible to discuss GUI-based Java ap plications without discussing inheritance and polymorphism. Thus rather than using contrived examples of Oo concepts, instructors can use some of Javas basic features - the class library, Swing and gUI components- to motivate these discussions in a natural wa Organization of the Text The book is still organized into three main parts. Part I( Chapters 0-4)in troduces the basic concepts of object orientation and the basic features of the Java language. Part II( Chapters 5-9)focuses on remaining language el ements, including data types, control structures, string and array process- ing, and inheritance and polymorphism. Part III(Chapters 10-16)covers advanced topics, including exceptions, file I/o, recursion, GUIs, threads and concurrent programming, sockets and networking, data structures, servlets and java server p The first two parts make up the topics that are ty pically covered in an introductory Cs1 course. The chapters in part I are self-contained and can be selectively added to the end of a csl course if time permits The first part(Chapters 0 through 4) introduces the basic concepts of object orientation, including objects, classes, methods, parameter passing, information hiding, and a little taste of inheritance, and polymorphism The primary focus in these chapters is on introducing the basic idea that an object-oriented program is a collection of objects that communicate and cooperate with each other to solve problems. Java language elements are introduced as needed to reinforce this idea. Students are given the basic building blocks for constructing Java programs from scratch Although the programs in the first few chapters have limited function ality in terms of control structures and data types, the priority is placed Table 2: A one-semester course Weeks Topics Chapters Object Orientation, UML Chapter o Program Design and DevelopmentChapter 1 2-3 Objects and Class definitions Chapter 2 Methods and Parameters Chapter 3 Selection structure (if-else) 4 User Interfaces and I/O Chapter 4 Data Types and Operators Chapter 5 Chapter 6 689 Control Structures( Loops) Structured Programming String Processing (loops) Chapter 7 Inheritance and polymorphism Chapter 8 10 Array Processing Chapter 9 11 Recursion Chapter 12 12 Advanced Topic(Exceptions) Chapter 10 13 Advanced Topic( GUIs Chapter 11 Advanced Topic(Threads) Chapter 15 on how objects are constructed and how they interact with each other through method calls and parameter passing The second part( Chapters 5 through 9) focuses on the remaining lan guage elements, including data types and operators( Chapter 5), control structures( Chapter 6), strings( Chapter 7), and arrays( Chapter 9). It also provides thorough coverage of inheritance and polymorphism, the primary mechanisms of object orientation:( Chapter 8) Part three( Chapters 10 through 16)covers a variety of advanced topics (Table 1). Topics from these chapters can be used selectively depending on instructor and student interest Throughout the book, key concepts are introduced through simple, easy-to-grasp examples. Many of the concepts are used to create a set of games, which are used as a running example throughout the text. Our pedagogical approach focuses on design. Rather than starting of with lan guage details, programming examples are carefully developed with an emphasis on the principles of object-oriented design Table2 provides an example syllabus from our one-semester CS1 course. Our semester is 13 weeks(plus one reading week during which classes do not meet). We pick and choose from among the advanced topics during the last two weeks of the course, depending on the interests and skill levels of the students Ralph morelli February 5, 2012

试读 127P java面向对象编程英文
立即下载 身份认证VIP会员低至7折
xfshao 高清版,英文原版,不错。
Primeshadow 还不错,很清晰
java面向对象编程英文 16积分/C币 立即下载

试读结束, 可继续阅读

16积分/C币 立即下载