package _04_构造方法;

public class Pet {
    private String name;
    private String type;


    public Pet() {
    }

    public Pet(String name, String type) {
        this.name = name;
        this.type = type;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return type
     */
    public String getType() {
        return type;
    }

    /**
     * 设置
     * @param type
     */
    public void setType(String type) {
        this.type = type;
    }

    public String toString() {
        return "Pet{name = " + name + ", type = " + type + "}";
    }
}
