anonymous No title
No License Java
2020年06月17日
Copy Clone
package datashori;

public class person4 extends person1 {
	private String kamoku;
	public String getKamoku() {
		return kamoku;
	}
	public void setKamoku(String kamoku) {
		this.kamoku = kamoku;
	}

	public void setAge(int age) {
		if(age<20) {
			System.out.println("Error!");
		}else {
			super.setAge(age);
		}
	}
	person4(){
		setName("狩野");
		setAge(22);
		setHeight(170);
		setShoes(20);
		setKamoku("プログラミング");
	}
}
package datashori;

public class person4 extends person1 {
	private String kamoku;
	public String getKamoku() {
		return kamoku;
	}
	public void setKamoku(String kamoku) {
		this.kamoku = kamoku;
	}

	public void setAge(int age) {
		if(age<20) {
			System.out.println("Error!");
		}else {
			super.setAge(age);
		}
	}
	person4(){
		setName("狩野");
		setAge(22);
		setHeight(170);
		setShoes(20);
		setKamoku("プログラミング");
	}
}
No one still commented. Please first comment.