package oop.instance;


public class Record {

int kor;

int eng;

int math;

public Record() //생성자

{

this.kor =2;

this.eng=3;

this.math=4;

}

public int total()

return this.kor + this.eng + this.math;

}

public int getKor()  //설정자

{

return this.kor;

}


public int getEng()

{

return this.eng;

}

public int getMath()

{

return this.math;

}

public void setKor(int kor) //설정자

{

this.kor=kor;

}


public void setEng(int eng)

{

this.eng=eng;

}

public void setMath(int math)

{

this.math=math;

}

}



+ Recent posts