业务类的抽象

public class Clazz {
    String schoolmate;
    String teacher;
    String school;
    String course;
    String clazz;

public Clazz() {   
};

public Clazz(String schoolmate,String course,String clazz) {
    this.schoolmate = schoolmate;
    this.course = course;
    this.clazz= clazz;
};

void print(Clazz stuClazz) {
    System.out.println("同学:"+stuClazz.schoolmate +",课程:"+stuClazz.course +",教室:"+stuClazz.clazz);
    
}

猜你喜欢

转载自blog.csdn.net/qyswkqy/article/details/80657719