class Student:
def __init__(self,name,lesson):
self.name=name
self.lesson=lesson
def choice_lessons(self):
pass
def scan_lessons(self):
pass
def check_lessons(self):
pass
def logout(self):
pass
class Mangements:
def __init__(self,name,path):
self.name=name
self.path =path
def creat_lessons(self):
pass
def creatStudentId(self):
student_id = input("输入学生ID")
student_name=input("输入学生姓名")
student_lesson=input("输入学生课程")
student_password=123456
with open(self.path,mode='a+',encoding='utf-8') as f:
f.write(f"student+{student_id}+{student_name}+{student_lesson}+{student_password}")
def creatMangementsId(self):
mangement_id = input("输入管理员ID")
mangement_name=input("输入管理员姓名")
mangement_lesson=input("输入管理员课程")
mangement_password=123456
with open(self.path,mode='a+',encoding='utf-8') as f:
f.write(f.write(f"mangement+{mangement_id}+{mangement_name}+{mangement_lesson}+{mangement_password}"))
def scan_lessons(self):
pass
def checkStudentLessons(self):
with open(self.path,mode='r',encoding='utf-8') as f:
for i in f:
if i.split('+')[0]=="student":
f.write(f"{i[1]}+{i[2]}+{i[3]}")
def logout(self):
pass
class Lesson:
def __init__(self,name,price,period,teacher):
self.name=name
self.price=price
self.period=period
self.teacher = teacher
if __name__ == '__main__':
mangement=Mangements("kk","444")
mangement.creatStudentId()