public class Cource ...{
private String name; // name of cource
private int[] par; // the par for each hole
/**//*
* Set the name of the course
*/
public void setName(String name) ...{
this.name = name;
}
/**//*
* Set the par for the cource
*/
public void setPar(int[] par) ...{
this.par = par;
}
/**//*
* Get the number of holes for the course
*/
public int getNumberOfHoles() ...{
return par.length;
}
文章來源于領測軟件測試網 http://www.kjueaiud.com/