Cleaning Up the Code

The rest of the methods in Listing 8.4 are straightforward, almost cookie-cutter. Compiling the finished file generates no errors, so you're mostly done for now with Customer.java. However, you need to practice some due diligence to avoid difficulties down the road.

Javadoc

All public methods need to have Javadoc written for them. As has already been pointed out, writing Javadoc is outside the scope of the book and has been left out of the printed examples to keep the page count inside the realm of sanity. However, you'll find full Javadoc in the source files found on the Web site.

Unit Tests

Unit tests are standalone tests that thoroughly exercise one particular piece of functionality. They are useful because they allow ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.