To the Instructor Java Teaching Strategies
There are three popular strategies in teaching Java. The first, known as GUI-first, is to mix Java applets and GUI programming with object-oriented programming concepts. The second, known as object-first, is to introduce object-oriented programming from the start. The third strategy, known as fundamentals-first, is a step-by-step approach, first laying a sound foundation on programming concepts, control statements, and methods, then introducing object-oriented programming, and then moving on to graphical user interface (GUI), applets, and finally to exception handling, I/O, data structures, internationalization, multithreading, multimedia, and networking.
The GUI-first strategy, starting with GUI and applets, seems attractive, but requires substantial knowledge of object-oriented programming and a good understanding of the Java event-handling model; thus, students may never fully understand what they are doing.
The object-first strategy is based on the notion that objects should be introduced first because Java is an object-oriented programming language. This notion, however, overlooks the importance of the fundamental techniques required for writing programs in any programming language. Furthermore, this approach inevitably mixes static and instance variables and methods before students can fully understand classes and objects and use them to develop useful programs. Students are overwhelmed by object-oriented programming and basic rules of programming simultaneously in the early stage of learning Java. This is a common source of frustration for freshmen learning object-oriented programming.
From my own experience, confirmed by the experiences of many colleagues, I have found that learning basic logic and fundamental programming techniques like loops is a struggle for most freshmen. Students who cannot write code in procedural programming are not able to learn object-oriented programming. A good introduction on primitive data types, control statements, methods, and arrays prepares students to learn object-oriented programming. Therefore, this text adopts the fundamentals-first strategy, proceeding at a steady pace through all the necessary and important basic concepts, then moving to object-oriented programming, and then to using the object-oriented approach to build interesting GUI applications and applets with exception handling, I/O, data structures, internationalization, multithreading, multimedia, and networking.Selection of Java Subjects
Many introductory Java texts lack sufficient breadth and do not cover all the core Java knowledge that is needed to develop useful projects. Some authors over ambitiously mix too many topics, such as Java database programming, Remote Method Invocation, JavaBeans and rapid application development, servlets, and JSP, into one introductory Java text. With this approach the coverage of programming principles tends to lose coherence.The Level 1 Certification Exam tests core Java knowledge and fundamental programming skills.
This book gives a comprehensive introduction on the fundamentals of programming in Chapters 1-5, an in-depth treatment of object-oriented programming in Chapters 6-9, extensive examples of GUI programming in Chapters 10-12, and appropriate coverage of advanced Java topics in Chapters 13-19. The book covers all the subjects required for the Level 1 Java Certification Exam.Audience of This Book
The book is suited for both beginning and advanced students, depending on how it is used. It has been used in two-semester freshman programming courses and one-semester courses in Java as a second language. It has also been used in short training courses for experienced programmers. Computer science departments, engineering departments, and management information systems departments around the world have used this book at various levels.Use of This Book
Every school is different. Some schools have used the book in one semester, and some have used it in a two-semester or three-semester sequence. The computer science curriculum has two important objectives: (1) to prepare students for immediate employment by teaching them marketable skills; (2) to teach students how to learn on their own. This book is designed to foster self-teaching with many complete examples, notes, tips, and cautions. Students should be able to learn on their own after mastering the first ten chapters. For students with no programming experience, an entire semester of four credit hours could be spent just on the first five chapters of the book, as we do in the first semester of the programming course at Armstrong Atlantic State University. In the second semester, we cover chapters 6-13, 17, and 19. In the first semester, students are new to programming. It takes time and patience to help them get into the mood of programming. In the second semester, we cover Chapters 6-13, 17> and 19. In the first semester, students are new to programming. It takes time and patience to help them get into the mood of programming. In the second semester, we cover Chapters 6, 7, part of 8 (up to Abstract Classes), part of 10 (up to Case Studies), 8 (Polymorphism, Dynamic Binding, and Interfaces), 10 (Event-driven programming), 11, part of 12 (just on applets), 13> part of 17 (just on file IO), 9 and 19, in this sequence (see Chapter Dependency Chart for other possible sequences). Students are capable of learning all the materials after Chapter 10 through self-teaching. The important part of the second semester is to guide the students to learn by themselves.Interactive Lectures
Over the years, I have tried many ways of teaching Java. The most effective approach is to teach it using the slides and writing, running and testing programs in the class interactively. Using the slides, you don't have to write on the board. It saves valuable lecture time. Writing, running, and testing programs in the class can hold students' attention and give them instantaneous feedback on how to program.Instructor Resources
The Instructor's Resource CD-ROM is available for instructors using this book. It contains the following resources:
To obtain the Instructor's Resource CD-ROM, contact your Prentice Hall sales representative. Some students have requested the solutions to the odd-numbered programming exercises. Please understand that these are for instructors only. Such requests will not be answered.The Web site also contains interactive online self-tests and other supplemental materials.Pedagogical Features of the Book
The philosophy of the Liang Java Series is teaching by example and learning by doing. Basic features are explained by example so that you can learn by doing. The book uses the following elements to get the most out of the material:
This book expands and improves upon Introduction to Java Programming, Third Edition. The major changes are as follows:
There is nothing more important to the future of computing than the Internet. There is nothing more exciting on the Internet than Java. A revolutionary programming language developed by Sun Microsystems, Java has become the de facto standard for cross-platform applications and programming on the World Wide Web.
Java is a full-featured, general-purpose programming language that is capable of developing robust mission-critical applications. In recent years, Java has gained enormous popularity and has quickly become the most popular and successful programming language. Today, it is used not only for Web programming, but also for developing standalone applications across platforms on servers, desktops, and mobile devices. Many companies that once considered Java to be more hype than substance are now using it to create distributed applications accessed by customers and partners across the Internet. For every new project being developed today, companies are asking how they can use Java to make their work easier.
Java is now taught in every university. This book teaches you how to write Java programs from beginning.Java's Design and Advantages
Stimulated by the promise of writing programs once and running them anywhere, Java has become the most ubiquitous programming language. Java programs run on full-featured computers, and also on consumer electronics and appliances such as Palm and mobile phones.
Because of its great potential to unite existing legacy applications written on different platforms so that they can run together, Java is perceived as a universal front-end for the enterprise database. The leading database companies, IBM, Oracle, and Sybase, have extended their commitment to Java by integrating it into their products. Oracle, for example, enables Java applications to run on its server and to deliver a complete set of Java-based development tools supporting the integration of current applications with the Web.Learning Java
To first-time programmers, learning Java is like learning any high-level programming language. The fundamental point in learning programming is to develop the critical skills of formulating programmatic solutions for real problems and translating the solutions into programs using selection statements, loops, and methods.
Once you acquire the basic skills of writing programs using loops, methods, and arrays, you can start to learn object-oriented programming. You will learn to develop object-oriented software using class encapsulation and class inheritance.
Applying the concept of abstraction in the design and implementation of software projects is the key to developing software. The overriding objective of this book, therefore, is to teach students to use many levels of abstraction in solving problems and to see problems in small and in large. The examples and exercises throughout the book foster the concept of developing reusable components and using them to create projects.
Students with no programming experience should take a slow-paced approach in Part I of the book. I recommend that you complete all the exercises in Part I before moving to Chapter 6. Students new to object-oriented programming may need some time to become familiar with the concepts of objects and classes. Once the principles are mastered, programming in Java is easy and productive. Students who know object-oriented programming languages such as C++ and Smalltalk will find it easier to learn Java. In fact, Java is simpler than C++ and Smalltalk in many aspects.Organization of the Book
This book is divided into four parts that, taken together, form a comprehensive introductory course on Java programming. Because knowledge is cumulative, the early chapters provide the conceptual basis for understanding Java and guide students through simple examples and exercises; subsequent chapters progressively present Java programming in detail, culminating with the development of comprehensive Java applications. The appendixes contain a mixed bag of topics, including an HTML tutorial.Part I: Fundamentals of Programming
The first part of the book is a stepping stone that will prepare you to embark on the journey of learning Java. You will begin to know Java, and will learn how to write simple Java programs with primitive data types, control statements, methods, and arrays.
Chapter 1, "Introduction to Java," gives an overview of the major features of Java: object-oriented programming, platform-independence, Java bytecode, security, performance, multithreading, and networking. The chapter also shows how to create, compile, and run Java applications and applets. Simple examples of writing applications are provided, along with a brief anatomy of programming structures.
Chapter 2, "Primitive Data Types and Operations," introduces primitive data types, operators, and expressions. Important topics include identifiers, variables, constants, assignment statements, assignment expressions, primitive data types, operators, and shortcut operators. Java programming style and documentation are also addressed.
Chapter 3, "Control Statements," introduces decision and repetition statements. Java decision statements include various forms of if statements and the switch statement. Java repetition statements include the while loop, the do-while loop, and the for loop. The keywords break and continue are discussed.
Chapter 4, "Methods," introduces method creation, calling methods, passing parameters, returning values, method overloading, scope of local variables, and recursion. Applying the concept of abstraction is the key to developing software. The chapter also introduces the use of method abstraction in problem-solving. The math class for performing basic math operations is introduced.
Chapter 5, "Arrays," explores an important structure: arrays for processing data in lists and tables. You will learn how to declare, initialize, and copy arrays. Examples of using two-dimensional arrays for matrix operations are provided. This chapter also introduces popular search and sorting methods.Part II: Object-Oriented Programming
In the book's second part, object-oriented programming is introduced. Java is a class-centric, object-oriented programming language that uses abstraction, encapsulation, inheritance, and polymorphism to provide great flexibility, modularity, and reusability in developing software. You will learn programming with objects and classes, class inheritance, interfaces, polymorphism, and developing software using the object-oriented approach.
Chapter 6, "Objects and Classes," begins with objects and classes. The important topics include defining classes, creating objects, using constructors, passing objects to methods, instance and class variables, and instance and class methods, scope of variables in the context of a class, the keyword this, and using the UML graphical notations to describe classes. Several examples are provided to demonstrate the power of the object-oriented programming approach. Students will learn the benefits (abstraction, encapsulation, and modularity) of object-oriented programming from these examples.
Chapter 7, "Strings," introduces the classes String, StringBuffer, and StringTokenizer for storing and processing strings. There are more than fifteen hundred predefined Java classes grouped in several packages. Starting with this chapter, students will gradually learn how to use Java classes to develop their own programs. The classes on strings are fine examples to demonstrate the concept of objects and classes.
Chapter 8, "Class Inheritance and Interfaces," teaches how an existing class can be extended and modified as needed. Inheritance is an extremely powerful programming technique, further extending software reusability. Java programs are all built by extending predefined Java classes. The major topics include defining subclasses, using the keyword super, using the modifiers protected, final, and abstract, polymorphism and dynamic binding, and casting objects. This chapter introduces the Object class, which is the root of all Java classes. You will also learn how to use abstract classes and interfaces.
Chapter 9, "Object-Oriented Software Development," focuses on class design. You will learn how to analyze relationships among objects and to design classes with the relationships association, aggregation, composition, strong inheritance, and weak inheritance. This chapter gives the guidelines for class design with several examples. The wrapper classes for primitive data types are introduced to encapsulate primitive data type values as objects. Finally, two examples of designing generic classes for matrix operations and linked lists are introduced.Part III: GUI Programming
The third part of the book introduces Java GUI programming. Major topics include event-driven programming, creating graphical user interfaces, and writing applets. You will learn the architecture of Java GUI programming API and use the user interface components to develop GUI applications and applets.
Chapter 10, "Getting Started with GUI Programming," introduces the concepts of Java GUI programming using Swing components. Topics include the Swing class hierarchy, frames, panels, and simple layout managers (Flomayout, GridLayout, and BorderLayout). The chapter introduces drawing geometric figures in the graphics context. The concept and techniques for Java event-driven programming are presented.
Chapter 11, "Creating User Interfaces," introduces the user interface components: buttons, labels, text fields, text areas, combo boxes, lists, check boxes, radio buttons, menus, scrollbars, and scroll panes. Today's client/server and Web-based applications use a graphical user interface. Java has a rich set of classes to help you build GUIs.
Chapter 12, "Applets and Advanced GUI," takes an in-depth look at applets, discussing applet behavior and the relationship between applets and other Swing classes. Applets are a special kind of Java class that can be executed from the Web browser. Students will learn how to convert applications to applets, and vice versa, and how to run programs both as applications and as applets. The chapter also introduces two advanced layout mangers (CardLayout and GridBagLayout) and the use of no layout. Advanced examples of handling mouse and keyboard events are provided.Part IV: Developing Comprehensive Projects
The book's final part is devoted to several advanced features of Java programming. You will learn how to use these features to develop comprehensive programs; for example, using exception handling to make your program robust, using multithreading to make your program more responsive and interactive, incorporating sound and images to make your program user-friendly, using input and output to manage and process a large quantity of data, creating client/server applications with Java networking support, and using the classes in the Java Collections Framework to build data structures in Java.
Chapter 13, "Exception Handling," teaches students how to define exceptions, throw exceptions, and handle exceptions so that their programs can either continue to run or terminate gracefully in the event of runtime errors. The chapter discusses predefined exception classes, and gives examples of creating user-defined exception classes.
Chapter 14, "Internationalization," introduces the development of Java programs for international audiences. You will learn how to format dates, numbers, currencies, and percentages for different regions, countries, and languages. You will also learn how to use resource bundles to define which images and strings are used by a component depending on the user's locale and preferences.
Chapter 15, "Multithreading," introduces threads, which enable the running of multiple tasks simultaneously in one program. Students will learn how to use the Thread class and the Runnable interface to launch separate threads. The chapter also discusses thread states, thread priority, thread groups, and the synchronization of conflicting threads.
Chapter 16, "Multimedia," teaches how to incorporate sound and images to bring live animation to Java applets and applications. Various techniques for smoothing animation are introduced.
Chapter 17, "Input and Output," introduces input and output streams. Students will learn the class structures of I/O streams, byte and character streams, file I/O streams, data I/O streams, print streams, object streams, random file access, delimited I/O, and interactive I/O.
Chapter 18, "Networking," introduces network programming. Students will learn the concept of network communication, stream sockets, client/server programming, and reading data files from the Web server.
Chapter 19, "Java Data Structures," introduces the Java Collections Framework. Students will learn to use classes and interfaces such as Collection, Set, Hashset, Treeset, Iterator, List, ArrayList, LinkedList, Vector, Stack, Map, HashMap, TreeMap, Collections, and Arrays to build projects.Appendixes
This part of the book covers a mixed bag of topics. Appendix A lists Java keywords. Appendix B gives tables of ASCII characters and their associated codes in decimal and in hex. Appendix C shows the operator precedence. Appendix D summarizes Java modifiers and their usage. Appendix E introduces number systems and conversions among binary, decimal, and hex numbers. Bitwise operations are also introduced in this appendix. Appendix F introduces HTML basics. Appendix G lists UML Graphical Notations for describing classes and their relationships. Appendix H introduces package-naming conventions, creating packages, and using packages. Appendix I discusses special floating-point values. Finally, Appendix J provides a glossary of key terms used in the text.
This text adopts the "fundamentals-first" strategy, proceeding at a steady pace through all the necessary and important basic concepts, and building up to object-oriented. programming. Students then move to using the object-oriented approach to build GUI applications and applets with exception handling, I/O, data structures, internationalization, multithreading, multimedia, and networking. Every chapter has been completely revised, malting for concise reading that is engaging, and at the same tune, easy to understand. Suited for beginning and advanced students from two-semester first-year programming courses to one-semester courses in Java as a second language. This book has also been used in short training courses for experienced programmers.KEY FEATURES
I've reviewed many of the Java textbooks on the market and have compared their coverage with the objectives of the Sun Programmer certification. Read morePublished on June 23 2003 by Leslie R. Hayden
You need to KNOW programming to read this book. It is not a almost perfect book but a very good book!Published on May 26 2003 by Hiep Nguyen
It seems people either love or hate this book. As a Java Instructor, I have used this book for several years, starting with the first edition. Read morePublished on Dec 27 2001 by Thomas L. McQueary