Understanding SQL & Java Together: A Guide to SQLJ, JDBC, and Related Technologies

Appendix C: Movie and Vote Classes

C.1 Introduction

This appendix contains the Movie, Vote, and VoteOutOfRange classes that were developed piecemeal in Chapter 6 and Chapter 8. The comments that introduce the variables and methods may seem verbose. They are structured comments used by the javadoc tool to generate HTML documentation for these classes.

C.2 The Movie Class

package Cinema;import java.util.*;import java.io.*;import java.sql.*;/** * This class represents a movie object. It allows votes to * be registered, which are used in the ordering of movies * to one another. * * @author   Andrew Eisenberg * @version  1.0 * @since    JDK 1.1.6 */<a name="1087"></a><a name="IDX-440"></a>public class Movie implements java.io.Serializable {   public String                    title;   public int                       length;   public String                    description;   private Hashtable                votes = new Hashtable ();   /**    * Constructor for a Movie    *    * @param  title         The title of the movie.  ...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Broadcasting, Studio, and Theatrical Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.