StudentNode - public double getscore return score public...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class StudentNode implements Comparable<StudentNode> { private int ID; private String name; private double score; private StudentNode link; p public StudentNode(int ID, String name, double score) { /* implement */ this.ID = ID; this.name = name; this.score = score; } public StudentNode(int ID, String name, double score, StudentNode link) { /* implement */ this.ID = ID; this.name = name; this.score = score; this.link = link; } // Implement accessor and mutator methods. public int getID() { return ID;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } public double getscore() { return score; } public StudentNode getlink() { return link; } public void set(int ID, String name, double score) { this.ID = ID; this.name = name; this.score = score; } public void setlink(StudentNode link) { this.link = link; } public int compareTo(StudentNode other) { /* implement */ if (score > other.score) return 1; else return 0; } public String toString() { /* implement */ return ID + " , " + name + " , " + score; } }...
View Full Document

This note was uploaded on 04/09/2010 for the course CS CS101 taught by Professor Hwang during the Spring '10 term at 카이스트, 한국과학기술원.

Ask a homework question - tutors are online