Académique Documents
Professionnel Documents
Culture Documents
{ return name; }
public void setscore(int mon,float diem) { if(mon==1) toan=diem; else if(mon==2) li=diem; else hoa=diem; }
public float getscore(int mon) { if(mon==1) return toan; else if(mon==2) return li; else return hoa; }
public float gethighscore() { float highscore; highscore=toan; if(li>highscore) highscore=li; if(hoa>highscore) highscore=hoa; return highscore; }
public String tostring() { return String.format("Name: %s \nToan: %.1f Li: %.1f Hoa: %.1f Trung Binh: %.1f",name,toan,li,hoa,getAverage()); } }