public class student { public String name; public int id; // 700 number public String major; public double gpa; public int year; // 0=freshman, 1= sophomore, etc... public student(String n, int i, double g, int y) { name=n; gpa=g; year=y; id = i; major="compsci";} public String toString() { String[] ys = {"freshman","sophomore","junior","senior"}; String s = ys[year]; return name+" is a "+s+" who majors in "+major+" and has a gpa of "+gpa; }// toString public student(String n) { name = n; // randomly generate the rest: String[] majors = {"compsci","math","physics","chemistry","biology","english","history","music","leisure studies"}; major = majors[(int)(Math.random()*majors.length)]; id = 700000000 + (int)(Math.random()*1000000); gpa = Math.random()*4; // nobody's perfect here year = (int)(Math.random()*4); } // alternate constructor generates random student: public student() { String[] names = {"josh", "julian", "steve", "ian", "mark", "dan", "chris", "mike", "lorrae", "john", "dylan", "eric", "mary", "larz", "narx"}; String[] majors = {"compsci","math","physics","chemistry","biology","english","history","music","leisure studies"}; name = names[(int)(Math.random()*names.length)]; major = majors[(int)(Math.random()*majors.length)]; id = 700000000 + (int)(Math.random()*1000000); gpa = Math.random()*4; // nobody's perfect here year = (int)(Math.random()*4); } } // student // make sure this file is in same directory as your hash table assignment.