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

public class person1 {

	   private String name ;
	   private int age;
	   private double height;
	   private int shoes ;
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		if(0 <= age ) {
			this.age = age;
			}else {
				System.out.println("おかしいですよ");
			}

		}


	public double getHeight() {
		return height;
	}
	public void setHeight(double height) {
		this.height = height;
	}
	public int getShoes() {
		return shoes;
	}
	public void setShoes(int shoes) {
		this.shoes = shoes;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public person1(){
		setName("香月");
		setAge(-1);
		setHeight(172.5);
		setShoes(20);
	}

	public void shoesAvarage(int b,int c ){
		  double a;
		  a = (double)b/c;
        System.out.println(a);
		     }


}
package datashori;

public class person1 {

	   private String name ;
	   private int age;
	   private double height;
	   private int shoes ;
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		if(0 <= age ) {
			this.age = age;
			}else {
				System.out.println("おかしいですよ");
			}

		}


	public double getHeight() {
		return height;
	}
	public void setHeight(double height) {
		this.height = height;
	}
	public int getShoes() {
		return shoes;
	}
	public void setShoes(int shoes) {
		this.shoes = shoes;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public person1(){
		setName("香月");
		setAge(-1);
		setHeight(172.5);
		setShoes(20);
	}

	public void shoesAvarage(int b,int c ){
		  double a;
		  a = (double)b/c;
        System.out.println(a);
		     }


}
No one still commented. Please first comment.