Functional and flexible, this guide takes an objects-first approach to Java programming and problem using games and puzzles. Updated to cover Java version 1.5 features, such as generic types, enumerated types, and the Scanner class. Offers independent introductions to both a command-line interface and a graphical user interface (GUI). Features coverage of Unified Modeling Language (UML), the industry-standard, object-oriented design tool. Illustrates key aspects of Java with a collection of game and puzzle examples. Instructor and Student resources available online. For introductory computer programming students or professionals interested in learning Java.
"synopsis" may belong to another edition of this title.
Preface Who Should Use This Book?
The topics covered and the approach taken in this book are suitable for a typical depthfirst Introduction to Computer Science (CS1) course or for a slightly more advanced Java as a Second Language course. The book is also useful to professional programmers making the transition to Java and object-oriented programming.
The book takes an "objects first" approach to programming and problem solving. It assumes no previous programming experience and requires no prior knowledge of Java or object-oriented programming. Why Start with Objects?
Java, Java, Java 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.
The first time I taught Java in our CS1 course I followed the same approach 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 arithmetic 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 going 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 collection 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 Chapter 3. It didn't get into loops, if-else, and other structured programming concepts until chapter 4 and beyond.
Presently, the main hurdle for beginners is object abstraction. Beginning programmers must be able to see a program as a collection of interacting objects and must learn how to decompose programming problems into well designed objects. Object orientation subsumes both procedural abstraction and structured programming concepts from the Pascal days. Teaching "objects early" takes a top-down approach to these three important concepts. The sooner you begin to introduce objects and classes, the better the chances that students will master the important principles of object orientation.
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 the course.
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 orientation. For example, it's almost impossible to discuss applets without discussing inheritance and polymorphism. Thus rather than using contrived examples of 00 concepts, instructors can use some of Java's basic features applets, the class library, GUI components - to motivate these discussions in a natural way. Key Features
In addition to its objects early approach, this book has several other important features.
The CyberPet Example. Throughout the text a CyberPet class is used as a running example to motivate and illustrate important concepts. The CyberPet is introduced in Chapter 2, as a way of "anthropomorphizing" the basic features of objects. Thus individual CyberPets belong to a class (definition), have a certain state (instance variables), and are capable of certain behaviors like eating and sleeping (instance methods). Method calls are used to command the CyberPets to eat and sleep. In Chapter 3 the emphasis is on defining and using methods and parameters to promote communication with Cyberpets. In subsequent chapters, concepts such as inheritance, randomness, animation, and threads are illustrated in terms of the CyberPet. Some of the lab and programming exercises are also centered around extending the behavior and sophistication of the CyberPet.
Applets and GUIs. Applets and GUIs are first introduced in Chapter 4 and then used throughout the rest of the text. Clearly, applets are a "turn on" for introductory students and can be used as a good motivating factor. Plus, event-driven programming and Graphical User Interfaces (GUIs) are what students ought now to be learning in CS1. We are j long past the days when command-line interfaces were the norm in applications programming. Another nice thing about Java applets is that they are fundamentally object oriented. To understand them fully; students need to understand basic OO concepts. That's why applets are not introduced until Chapter 4, where they provide an excellent way to motivate the discussion of inheritance and polymorphism.
Companion Web Site. The text is designed to be used in conjunction with a companion Web site that includes many useful resources, including the Java code and Java documentation (in HTML) for all the examples in the text, additional lab and programming assignments, on-line quizzes that can be scored automatically, and PowerPoint class notes. Problem Solving Approach. A pedagogical, problem solving approach is taken throughout the text. There are total of 13 fully developed case studies, as well as numerous other examples that illustrate the problem solving process. Marginal notes in the text repeatedly emphasize the basic elements of object-oriented problem solving: What objects do we need? What methods and data do we need? What algorithm should we use? And so on. Self-study Exercises. The book contains more than 200 self-study exercises, with answers provided at the back of each chapter. End-of-Chapter Exercises. Over 400 end-of-chapter exercises are provided, including "Challenge" exercises at the end of most sets. The answers are provided in an Instructor's Manual, which is available to adopters. Programming, Debugging and Design Tips. The book contains nearly 400 separately identified "tips" (Programming Tips, Debugging Tips, Effective Design Principles, and Java Language Rules) that provide useful programming and design information in a nutshell. Laboratory Sections. Each chapter concludes with a laboratory exercise, so the text can easily be used to support lab-based CS1 courses (such as ours). For CS1 courses that are not lab-based, these sections can still be read as preparation for a programming assignment. For each lab in the text, the companion Web site contains additional resources and handouts, as well as a repository of alternative lab assignments. From the Library Sections. Each chapter includes a section that introduces one or more of the library classes from the Java API (Application Programming Interface). In the early chapters these sections provide a way of introducing tools, such as I/O classes and methods, needed to write simple programs. In subsequent chapters, some of these sections introduce useful but optional topics, such as the NumberFormat class used to format numeric output. Others introduce basic GUI (Graphical User Interface) components that are used in program examples and the laboratory sections. Object-Oriented Design Sections. Each chapter includes a section on Object-Oriented Design which is used to underscore and amplify important principles such as inheritance, polymorphism, and information hiding. Java Language Summary. Those chapters that introduce language features contain Java Language Summary sections that summarize the feature's essential syntax and semantics. Organization of the Text
The book is organized into three main parts. The first part (Chapters 0 through 4) introduces the basic concepts of object orientation, including objects, classes, methods, parameter passing, information hiding, inheritance, and polymorphism. Although the primary focus in these chapters is on object orientation, rather than Java language details, each of these chapters has a Java Language Summary section that summarizes the language elements introduced.
In Chapters 1 to 3 students are given the basic building blocks for constructing a Java program from scratch. Although the programs at this stage have limited functionality in terms of control structures and data types, the priority is placed on how objects are constructed and how they interact with each other through method calls and parameter passing.From the Back Cover:
The text uses a top-down approach to focus on problem decomposition and program design from the beginning. It is this methodology-along with its lucid and engaging exercises and analogies- that sets this book apart. Morelli introduces some of Java's advanced features including GUIs (e.g. AWT and Swing), exceptions, threads, files, and sockets. Because of this resource's adaptable and accessible style, instructors can easily choose which advanced concepts to teach to introductory students while intermediate level programmers can also benefit from its thorough advanced feature coverage.
Offers an emphasis on design and problem solving through instruction and examples Emphasizes OO design concepts such as inheritance and information hiding early on and presents them as an essential component of using an OO language Features GUI elements and applets to captivate and maintain the reader's interest while introducing them to real-world examples Incorporates action learning tools such as "In the Laboratory" sections, "CyberPet" examples, and drop-in boxes on effective design, programming and debugging tips, and Java language rules Covers advanced features of the Java: GUIs, graphics and drawing; exceptions; recursive problem solving; threads and concurrent programming; files, streams, and input/output techniques; sockets and networking; and data structures Includes a Companion Website-with extensive supplementary resources such as a Study Guide, Power Point slides, Java code-and a CD-ROM that includes the Java code for all the examples in the text, and Java® 2 SDK, Standard Edition, Borland JBuilder 3, University Edition, and NetBeans
"About this title" may belong to another edition of this title.
Book Description Prentice Hall, 2006. Paperback. Book Condition: New. book. Bookseller Inventory # M0131474340
Book Description Prentice Hall, 2006. Paperback. Book Condition: New. Never used!. Bookseller Inventory # P110131474340