Student

public class Student {
    //フィールド宣言
	String name;    // 氏名
    int[] tens;     // 試験の点数 フィールドtensの配列定義。

///////////////////////////////	
//同じ名前のメソッドであっても引数違うので、
//違うメソッドとして扱われる。
///////////////////////////////	
//Studentメソッド(引数,引数)
///////////////////////////////

	public Student(String name, int[] tens) {
        this.name = name;
        this.tens = tens;
    }

///////////////////////////////
//Studentメソッド(引数,引数,引数,引数)
///////////////////////////////	

	public Student(String name, int x, int y, int z) {
        
		//配列の基本↓//
		// int[] tens;    ←始めにフィールド定義されてる。
		// tens = new int[3] ←これに.thisをつけるだけ。
		this.tens = new int[3];
		
		
		this.name = name;
        this.tens[0] = x;
        this.tens[1] = y;
        this.tens[2] = z;
    }
	
///////////////////////////////
	
	public String toString() {
        String s = "[" + this.name;
        for (int i = 0; i < this.tens.length; i++) {
            s += "," + this.tens[i];
        }
        s += "]";
        return s;
    }
	
///////////////////////////////	
	
	public int total() {
        int sum = 0;
        for (int i = 0; i < this.tens.length; i++) {
            sum += this.tens[i];
        }
        return sum;
    }
	
///////////////////////////////	

}