Java Software Solutions: Foundations of Program Design - 2nd Edition / An Introduction to Object-Oriented Programming with Java - 2nd Edition / Java Elements: Principles of Programming in Java

Mathematics and Computer Education, Fall 2001 by Rogers, Michael P

THREE JAVA-BASED TEXTBOOKS FOR AN INTRODUCTORY PROGRAMMING COURSE

Java Software Solutions: Foundations of Program Design - 2"d Edition

by John Lewis and William Loftus

Addison-Wesley, Reading, MA, 2000, 780 pp.

An Introduction to Object-Oriented Programming with Java - 2nd Edition

by C. Thomas Wu

McGraw-Hill, New York, NY, 2001, 863 pp.

Java Elements: Principles of Programming in Java

by Duane A. Bailey and Duane W. Bailey

McGraw-Hill, New York, NY, 2000, 333 pp.

A cursory glance through the catalogs of the major textbook publishers, or a stroll through the computer section of your local bookstore, underlines the obvious: that the development of Java, a modestly sized language accompanied by a staggeringly large and powerful set of classes, over 2,000 at last count, has triggered a tsunami of textbooks.

Since choosing a textbook is a highly personal decision, and since there are such a large number of good-to-excellent works on the market, I will discuss three texts written for beginning programmers that take different approaches. At least one of these may be appropriate for your needs.

JAVA SOFTWARE SOLUTIONS, by John Lewis and William Loftus, consists of 12 chapters: Computer Systems, Objects and Primitive Data, Program Statements, Writing Classes, Enhancing Classes, Arrays and Vectors, Inheritance, Exceptions and I/O Streams, Graphical User Interfaces, Software Engineering, Recursion, and Data Structures. The book contains 13 appendices which cover aspects of the language, HTML, and describe the main classes (in 150 pages). Supplementary material is also available on Lewis' website.

The book commences with a relatively thorough overview of computer systems - discussing critical background material, such as the difference between hardware and software, computer architecture, the internet and the world wide web, and finally, the essentials of programming. The sections in the chapters are nicely compartmentalized so that, if your students are already cognizant of the basics, they can leap into section 1.4, on Programming, without loss of continuity.

There are two schools of thought regarding object-oriented programming (OOP). Advocates of the objects-first model suggest instructors seize the nettle and provide an early, comprehensive discussion of the topic. Proponents of the imperative-first model recommend postponing an in-depth conversation until the "basics" are understood. While Lewis and Loftus are devoted OOP-fists, they take this latter route. Students are exposed to objects early on - indeed it is virtually impossible to do anything in Java without them - but the objects are simply used rather than becoming the focus of study. After a brief discussion of objects, students are introduced to Strings and Random objects. Students will use them before fully comprehending the underlying principles - which is fine. However, instructors might opt to either supplement the text at this point, or take a brief segue into section 4.1, "Objects Revisited".

Lewis and Loftus introduce applets at the end of Chapter 2, in such a way that the topic could easily be omitted if desired. The careful reader will observe that although the authors use Java 2, and they use applets, they do not use the two together: in the chapter on Swing, they deal exclusively with applications. This is thoroughly understandable. As of this writing, the use of Java 2 in web browsers requires the Java plug-in, and a different, more complicated HTML tag. This should be a transient phenomenon, and in a textbook whose emphasis is CS I material, its mention would needlessly muddy the waters. Fortunately, the website that accompanies the text indicates how to use the Java plug-in.

Chapters 3 and 4 offer a generally thorough and fine explanation of the basics of the Java language, but it seems that constructors don't quite get the respect that they deserve. While the subject of constructors is discussed in several places, the section entitled "Constructors" is itself quite short. Also, the discussion of constructor overloading appears in a section on "Method Overloading", which may serve to mislead students who don't always grasp the difference between methods and constructors. Still, these remain minor quibbles in a generally well-written chapter.

In Chapter 5, Lewis and Loftus explore a miscellany of important OOP topics - the details of reference variables, static vs. non-static methods and variables, and a brief mention of nested and inner classes. Detailed discussion of these latter two syntactically awkward and advanced topics is wisely relegated to their web site. Interfaces receive full coverage. After a suitably simple first example, the authors introduce MouseListeners, MouseMotionListeners, and ActionListeners - providing opportunities for some very exciting and motivating assignments.

Java, and even more so the Java Class Library (JCL), is constantly evolving and expanding. This presents numerous difficulties for instructors. The quintessential example is GUI (graphical user interface), and the difficulty may be summarized as "To Swing, or not to Swing?" The GUI that shipped with Java 1, part of the Abstract Windowing Toolkit (AWT) package, has numerous problems, and it is clear that the future of the Java GUI rests with Swing. Yet the AWT GUI does have the advantage of simplicity and, as mentioned earlier, is the only guaranteed package for applets running in web browsers. So, it is to their credit that Lewis and Loftus, while not completely abandoning AWT, present both AWT and Swing, in separate chapters to reduce confusion.

 

BNET TalkbackShare your ideas and expertise on this topic

Please add your comment:

  1. You are currently: a Guest |
  2.  

Basic HTML tags that work in comments are: bold (<b></b>), italic (<i></i>), underline (<u></u>), and hyperlink (<a href></a)

advertisement
Click Here
advertisement
  • Click Here
  • Click Here
  • Click Here
advertisement

Content provided in partnership with ProQuest