Esempio n. 1
0
def add_grade():
    print("请填写班级信息:")
    grade_name = input("名称:")

    print("选择学校:")
    data.print_schools()
    school_name = input("学校名:")
    school = data.get_school(school_name)
    if school == None:
        print("学校选择错误")
        return

    print("选择老师:")
    data.print_teachers()
    teacher_name = input("老师名:")
    teacher = data.get_teacher(teacher_name)
    if teacher == None:
        print("老师选择错误")
        return

    print("选择课程:")
    data.print_courses()
    course_name = input("课程名:")
    course = data.get_course(course_name)
    if course == None:
        print("课程选择错误")
        return

    grade = school.create_grade(grade_name, teacher, course)
    data.update_grade(grade)
    data.update_school(school)
Esempio n. 2
0
def add_teacher():
    print("请填写教师信息:")
    teacher_name = input("姓名:")

    print("选择学校:")
    data.print_schools()
    school_name = input("学校名:")
    school = data.get_school(school_name)
    if school == None:
        print("学校选择错误")
        return

    teacher = school.create_teacher(teacher_name)
    data.update_teacher(teacher)
    data.update_school(school)
    print("老师 %s 创建成功!" % teacher.name)
Esempio n. 3
0
def add_course():
    print("请填写课程信息:")
    course_name = input("名称:")
    cycle = input("周期:")
    price = input("学费:")

    print("选择学校:")
    data.print_schools()
    school_name = input("学校名:")
    school = data.get_school(school_name)
    if school == None:
        print("学校选择错误")
        return

    course = school.create_course(course_name, cycle, price)
    data.update_course(course)
    data.update_school(school)
Esempio n. 4
0
def choose_school():
    print("选择学生:")
    data.print_students()
    student_name = input("学生名:")
    student = data.get_student(student_name)
    if student == None:
        print("学生选择错误")
        return

    print("选择学校:")
    data.print_schools()
    school_name = input("学校名:")
    school = data.get_school(school_name)
    if school == None:
        print("学校选择错误")
        return

    student.choose_school(school)
    data.update_student(student)
    data.update_school(school)
Esempio n. 5
0
def add_student():
    print("请填写学生信息:")
    name = input("姓名:")

    print("选择学校:")
    data.print_schools()
    school_name = input("学校名:")
    school = data.get_school(school_name)
    if school == None:
        print("学校选择错误")
        return

    print("选择班级:")
    data.print_grades()
    grade_name = input("班级名:")
    grade = data.get_grade(grade_name)
    if grade == None:
        print("班级选择错误")
        return

    student = education.Student(name, school, grade)
    data.update_student(student)
    data.update_school(school)
    data.update_grade(grade)
Esempio n. 6
0
def show_schools():
    data.print_schools()