package com.sf.day05.practice;

public class Cat1 {
    private String name;
    private Integer id;

    public Cat1() {
    }

    public Cat1(String name, Integer id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

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

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Cat1{" +
                "name='" + name + '\'' +
                ", id=" + id +
                '}';
    }

    public void catchMouse(){
        System.out.println("小猫捉老鼠");
    }

    public void eat(){
        System.out.println("小动物正在吃饭");
    }

    public void sleep(){
        System.out.println("小动物正在休息");
    }

    public void showMySelfInfoP(){
        System.out.println("我是id为"+id+"号，名字为"+name+"的可爱小动物！！！");
    }


    public static void main(String[] args) {
        Cat1 cat1 = new Cat1();
        cat1.setId(1001);
        cat1.setName("波斯");

        cat1.catchMouse();
        cat1.eat();
        cat1.sleep();
        cat1.showMySelfInfoP();

    }
}
