package com.sxt;
public class Dongwu {
String name;
String zl;
public Dongwu() {
}
public Dongwu(String zl,String name){
this.zl=zl;
this.name=name;
}
public void bushi(){
System.out.print(name+"正在准备捕食");
}
public void jinshi(){
System.out.println("正在进食的"+name);
}
public static void main(String[] args) {
Dongwu shizi=new Dongwu("肉食类","狮子");
Dongwu tuzi =new Dongwu("素食类","兔子");
shizi.bushi();
tuzi.jinshi();
}
}
public class Dongwu {
String name;
String zl;
public Dongwu() {
}
public Dongwu(String zl,String name){
this.zl=zl;
this.name=name;
}
public void bushi(){
System.out.print(name+"正在准备捕食");
}
public void jinshi(){
System.out.println("正在进食的"+name);
}
public static void main(String[] args) {
Dongwu shizi=new Dongwu("肉食类","狮子");
Dongwu tuzi =new Dongwu("素食类","兔子");
shizi.bushi();
tuzi.jinshi();
}
}