Reading material

If you use the first edition of the textbook, follow the reading material in orange. If you use the second edition, follow the reading material in brown.

(1st) pages 284-287 (Section 7.6) , also have a look at the material about hash tables in the second edition

(2nd) pages 343-350 (Section 8.3)

Additional material

Implementation of a dictionary by means of a hash table: PostScript and PDF

Question

Give a hash code for keys of the form
public class Student
{
    /** Student's name */
    private String name;

    /** Student number */
    private byte number;

    /** Student's gpa */
    private double gpa;

    /**
     * Returns a hash code value for the student.
     *
     * @return A hash code value for the student.
     */
    public int hashCode()
    {
        ...
    }
}