Detailed Requirements:
1, the establishment of Beijing, Shanghai 2 schools
2, create Linux, Python, go 3 courses, Linux\py opened in Beijing, go in Shanghai Open
3. Courses include, cycle, price, create a course through the school
4, through the school to create classes, class-related courses, lecturers
5, when creating students, select the school, related classes
6. Associate the school when creating the instructor role
7, provide two role interface:
8, for students, lecturers, administrators to provide user interface, and provide the corresponding functions:
1) Student view, can register, pay tuition, select class,
2) Instructor View, instructor can manage their own classes, select classes in class, view class student list, modify the results of the students managed
3) Manage views, create instructors, create classes, create courses
Note 1: Data generated by the above operation is saved to the file by Pickle serialization Note 2: This job must draw a flowchart,
The diagram does not have the same type or the call relationship between the objects
I. Optional COURSE system use case
# # Use case name
Course Selection System
# # Scene
Who: Student, teacher, administrator
Where:oldboy
When:anytime
# # Use case description
1, the administrator created the school: Beijing and Shanghai two campuses
2. Administrator-created courses: Python, Linux, Go (python,linux in Beijing campus, go in Shanghai campus)
3, the administrator creates the class: Python weekend 18, Python 7, Linux architecture 35 period
4, the administrator created students: Erleng,bode,wenjie
5. Administrator-created Instructor: Alex (Python), Egon (), Wupeiqi
6, the instructor to create the class record: Python weekend class 18 period Day7
7, the lecturer for Day7 this class all the students to grade homework, for each student grading
8, students Wenjie to view their course information: the school, enrollment courses, the class
9, the student Wenjie in the Python18 period Day7 submitted the job
10, students wenjie to see their list of achievements in Day7
Second, find a noun
Administrator, School, course, class, student, instructor, class record, job, score, student details, list of achievements
Third, plus attributes
Noun attribute method
Administrator None created (school, course, class, instructor, student)
School name, address, course list, class list None
Course name, period, price, outline None
Class name, school, course None
Student name, course selection, view course information, submit job, view list of achievements
Instructor name, course record, score
Class record course name, time
Job Course Name
Student information name, class, course
Score list name, course, score
1, the creation of courses, classes need to select schools, and the curriculum, class information to join the school
Iv. data storage method (pickle after serialization)
Administrator information: {"username": "admin", "password": "123"}
School information: {"luffycity_beiing": {"Address": "Beijing Shahe", "courses": [], "classes": []},
"Luffycity_shanghai": {"Address": "Shanghai Hongqiao", "courses": [], "Classes"}:[]}
Course Information: {"Python": {"School": "Luffycity_beiing", "Course_time": "6mons", "Course_price": "8000", "Course_info": " Python full stack Development "},
"Linux": {"School": "Luffycity_beiing", "Course_time": "8mons", "Course_price": "8000", "Course_info": "Linux Advanced Architecture"},
"Go": {"School": "Luffycity_shanghai", "Course_time": "7mons", "Course_price": "10000", "Course_info": "Go Advanced Development"}}
Class information: {"Python": {"School_name": "Luffycity_beijing", "class_name": "Python_online class", "Teachers": [], "Students": []},
Student information: {"Wenjie": {"age": +, "sex": "Male", "password": "123", "School_name": "Luffycity_beijing", "Classes": [], "course" :[]}}
Instructor Information: {"Alex": {"age": +, "sex": "Male", "password": "123", "Course": "Python", "class_name": "Python Full Stack"}}
Course record: {"python_mod1": {"time": XXX, "task": "User Login Interface program", "Submission_list": []}}
Learning record: {"Wenjie": {"Course"}: "Python", "already_learned" []}
Transcript: {"Wenjie": {"task": "0"}}
V. Directory structure
.
├──course_selection_system # Course Selection system
││
│├──bin # Executable Program Entry directory
││├──__init__.py
││└──start.py # Launch Portal
│├──CONF # configuration file directory
││├──__init__.py
││└──settints.py # configuration file directory
│├──core# Main program directory (three main views)
││├──__init__.py
││├──main.py# Main Program
││├──manager.py# Manager Class
││├──student.py# Student Class
││└──teacher.py# Teacher Class
│├──database# Data Structure Directory
││├──crouse_record# Class Record Catalogue
│││├──go.pkl# Go class record data
│││├──linux.pkl# Linux class record data
│││└──python.pkl# Python class record data
││├──learn_record# Learning Record Catalogue
│││├──go_learned.pkl# go learning to record data
│││├──linux_learned.pkl# Linux Learning Record Data
│││└──python_learned.pkl# python learning to record data
││├──score_record# Results Catalogue
│││├──go_score.pkl# Go score Data
│││├──linux_score.pkl# Linux Performance data
│││└──python_score.pkl# Python score data
││├──classes.pkl# class Data
││├──courses.pkl# Course Data
││├──manager.pkl# Administrator User Data
││├──schools.pkl# School Data
││├──students.pkl# Student User Data
││└──teachers.pkl# Instructor User Data
│└──modules # Common Modules Directory
│├──__init__.py
│└──public_mod.py# password encryption, user login verification, pickle serialization
└──readme
Vi. Introduction of main modules
1. Manager class
Include Create school (print school), create course (print course), create class (print Class), create learner (print learner), create instructor (print instructor)
Where the learner method is created, it is called again when the learner authenticates the sign-in feature;
2, Student class
# object Private parameter (name)
#方法: Print Current learner information, select course (buy course), learn manage (learn by module, submit job), submit job, view results
3, Teacher class
# object Private parameter (name)
#方法: Class management, creating Class records (print Course records), grading assignments
4, Datapickle class
# object Private parameter (path)
# method: Dump, load
Vii. Test Account
1, administrator: admin:123
2, Student: wenjie:123 erleng:123 bode:123
3, Lecturer: alex:123 egon:123 Peiqi; 123
Eight, the code:
Cloud Disk: Subsequent updates
python-Course Selection System