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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.