A.1. The Conference Class

// Conference.java

package nfl.original;

/** This class provides numeric constants to represent the
  * NFL Conferences, and Strings associated with each
  * conference.
  */
public class Conference
{
    public final static int AFC = 0;
    public final static int NFC = 1;

    public static String getName(int i) {
        if (i == NFC) return "NFC";
        else if (i == AFC) return "AFC";
        else return "INVALID";
    }
}

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.