2.3. The Team Class

The Team class is central to the application. Each team has a small number of invariant attributes, such as the name of the team, its home city, and the Conference and Division to which it belongs. There is then quite a bit of data that is updated throughout the season: games won, lost, and tied; points scored; points allowed; etc. Although our classes aren't fully JavaBeans-compliant (see the following sidebar), we do follow the convention of providing accessor methods to our private data properties. The properties of the Team class are shown in Table 2.2. A full listing of the code is shown in the Appendix.

JavaBeans Coding Style

While we aren't going to spend any time in this book specifically exploring JavaBeans, I've ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services 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.