ACCU Home page ACCU Conference Page
Search Contact us ACCU at Flickr ACCU at GitHib ACCU at Facebook ACCU at Linked-in ACCU at Twitter Skip Navigation

Search in Book Reviews

The ACCU passes on review copies of computer books to its members for them to review. The result is a large, high quality collection of book reviews by programmers, for programmers. Currently there are 1949 reviews in the database and more every month.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
    View all alphabetically
Title:
Principles of Object-Oriented Programming in Java 1.1
Author:
Cooper
ISBN:
1 56604 530 4
Publisher:
Ventana
Pages:
Price:
Reviewer:
Jason Hulance
Subject:
java; object oriented
Appeared in:
11-1
This book is one of the few in the category of teaching OOP using Java, which made it a candidate for the course text of an OOP course I was helping to give for the local University. In 1996 (when we last gave this OOP course) there were very few Java books on the shelves, and not even the greatCore Javahad faultless example Java code. Two years on, we hoped the situation might have changed. There are certainly a plethora of Java books out there now, but still not very many good ones.

So what of Cooper's book? Well, it seems to start off on the right lines, with an overview of what OOP means, then some simple Java syntax, then more details of OOP in Java, and so on. But from the beginning you get the feeling that it's a rushed job or (like many others) not actually a Java book, more a simple conversion from a book on some other language. In particular, the OO examples Cooper chooses are far from illustrative or natural; they make you wonder why he chose them rather than think about the point he's trying to make.

One thing that clearly comes across from the book is that Cooper fought hard with the compiler to get it to accept his programs. The text is littered with advice in the style of error message circumvention, rather than using features effectively and promoting a good coding style. As seasoned programmers know, it's best to try to find the correct shaped pin rather than bang the wrong one in with a hammer...

Common, basic Java errors are evident, too. Cooper obviously does not understand the difference between the "==" operator and the "equals" method, so it is not surprising that his examples only work with the accidental co- operation of Java's string management. You get a strong feeling that Cooper's background of Visual Basic is showing through...

Inconsistency is another flaw common in this kind of book. At one point Cooper tells you that using "switch" (or in his case, lots of "if"s) over different types is wrong and that using inheritance (i.e., pure polymorphism) is the correct approach. Then about 40 pages later his major example doeseverything the wrong way. He also falls foul of that popular inconsistency: screenshots that clearly weren't generated from the presented code.

But probably the biggest thing that upset me about this book is the quite awful chapter on exceptions. Cooper's battles with the compiler are most manifest here, probably because the point of exceptions seems entirely lost on him. In his first complete example he

stops the compiler producing an errorby initialising an object to "null", and thereby misses the fact that his program might later dereference it! When the code for the next example can fail to perform its cleanup properly, it becomes clear that Cooper finds Java's exceptions to be a real hindrance. So much so, that he then constructs a wrapper class that smothers all exceptions and provides a "checkErr" method instead. Oh dear, oh dear.

All in all, this book is probably not much worse than many others out there. Its Java is quite poor and although its coverage of OOP is verging on adequate, it is far too brief. In the end, we chose Budd'sUnderstanding Object-Oriented Programming with Javafor our course text; it's a greatly superior book in OO terms, although its Java is still imperfect.