package com.sf.day09.abstractpackage;

/**
 * 抽象类  Father
 */
public abstract class Father {

    private String name;
    private Integer age;
    private Double  weight;

    public Father() {
    }

    public Father(String name, Integer age, Double weight) {
        this.name = name;
        this.age = age;
        this.weight = weight;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "Father{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", weight=" + weight +
                '}';
    }

    /**
     * 普通方法
     */
    public void run(){

    }

    /**
     * 抽象方法
     * 语法结构： 权限修饰符   abstract  数据的返回值类型   方法名(入参（可选）);
     *
     * 抽象类    ： 包含抽象方法的类   可以包含普通方法
     * 抽象类的语法结构：  权限修饰符   abstract   class   抽象类的类名   {}
     * 但是      正常类中不能抽象方法
     */

    public abstract void eat();

    public abstract void sleep();


}
