C language training -- student achievement management system

At the end of learning the C language, the teacher asked us to do the system with reference to the code in GitHub. I have uploaded the complete code to the resource and intend to take it myself.

catalogue

I requirement analysis

        1. Software development purpose

        2. functional requirement

        3. Performance requirements

II overall design

III detailed design

IV Operation results

V Partial source code

I requirement analysis

        1. Software development purpose

The contemporary student group is huge, and each student has scores in many different disciplines. The traditional handwriting processing can not meet the requirements of management. Therefore, it is very necessary to establish a clear and accurate student score management system. The system is written in C language and has the functions of score query, information addition, modification and deletion. The operation is simple and easy to understand.

(1) first, a menu page appears, and select the corresponding operation according to the menu prompt

(2) store teacher information, student information, course information and achievement information in the file.

(3) carry out the basic operations contained in the management system in this system, including:

a) complete the authentication when logging in with different user identities (administrator, teacher and student);

b) the administrator can manage teacher information, course information, student information and browse all information;

c) teachers can modify teachers' information and input students' scores;

dd) students can only view their grades;

        2. functional requirement

(1) input and storage of basic information of teachers and students

The function of this part is to save the administrator's account and password in idadm Txt, save the teacher's account and password in idtea Txt, save the teacher's account, gender, name and teaching subject in userinfo Txt, save the student's student number (account number) and password in idstu.txt, and save the student's name, student number, single subject scores and total scores of the three courses in StudentScore.txt.

(2) teacher information management

The functions of this part can be realized by the administrator. After the administrator logs in successfully, it can query, modify, delete and add teacher information.

(3) display all student information

The function of this part is realized by the administrator or teacher. After logging in, the administrator or teacher can directly view the information of all students in the system by selecting to display all student information

(4) student information data query

The functions of this part can be realized by students, teachers and administrators. Students, teachers and administrators can run this function after logging in successfully.

(5) modification of student information data

The function of this part is realized by the administrator or teacher. After the teacher or administrator logs in successfully, the student number, name and subject scores of the student can be modified by searching the student's student number

(6) deletion of student information data

The function of this part is realized by the administrator or teacher. After the teacher or administrator logs in successfully, the information data of the student can be deleted by searching the student's student number

(7) addition of student information data

The function of this part is realized by the administrator or teacher. After the teacher or administrator logs in successfully, the system will prompt to input the information of the new student, and the program will insert the new information into the original student information list and output the new student information list to facilitate the user's confirmation.

(8) exit the system and end the task.

        3. Performance requirements

(a) efficiency, stability and safety

(b) friendly man-machine interface and convenient operation

(c) low maintenance costs

II overall design

2. Overall system flow chart

 

III detailed design

1.login() -- user login

Function function: used for login of students, teachers and administrators. After successful login of the three identities, there are different function choices.

Function process: the user enters the account and password, and the function compares it in the linked list extracted from txt. If it is correct, it will jump to the selection page, and if it is wrong, it will exit the program.

flow chart:

 

2.main() -- main program

Function purpose: select three login methods for users - teachers, students and administrators. The user can also choose to exit.

flow chart:

 

 

 

3.menu() -- menu function

Function purpose: give different users different choices

4. Output() -- display the data information of all students

Function purpose: print all student information

Function process: while loop continuously prints student information

flow chart:

 

5.print() -- take out the information from the file and save it in the linked list

Function purpose: take out the teacher or student information from the file and save it to the linked list for subsequent use.

Function process: open the txt file, input the linked list separately, and put it into the linked list for subsequent use.

flow chart:

 

6.wenjian() -- save the data in the linked list in a file

Function purpose: used to enter data when entering or modifying information.

Function process: open txt and enter with linked list

Flow chart:

 

7.xuanze() -- Select function

Function purpose: select functions for users

Function process: read the function code entered by the user and jump to the corresponding function with switch.

flow chart:

 

IV Operation results

Student achievement

 

Administrator login

Query teacher information

Add teacher information

Entered successfully

V Partial source code

 

#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <iostream>
#include<math.h>
#include<conio.h>
struct student{
    char num[20];
    char name[20];
    int  score[3];
    int grades;
    struct student *next;
};typedef struct student DATE;
struct teacher{
    char num[20];
    char sex[10];
    char name[20];
    char course[20];
    struct teacher *next;
}; 
typedef struct teacher DATEA;
void xuanze();
void welcome1();
void welcome();
void loginstu();
void logintea();
void loginadm();
void Menu();
void Menu2(); 
void xuanze();
void admin();
void Wenjian(DATE *head){ //Save the data in the linked list in a file}
void Wenjiant(DATEA *head){ //Save the data in the linked list in a file}
int icountt;
DATEA *Creatt(){ //Teacher data information creation}
DATEA *Printt(){//Take out the teacher information from the file and save it to the linked list}
void Addt(){ //Addition of student data information}
int Changet(){ //Teacher data information modification}
int Deletet(){ //Teacher data information deletion}
int Searcht(){ //Teacher information query}
int icount;
DATE *Creat(){ //Student data information creation}
DATE *Print(){//Take out the student information from the file and save it to the linked list}
void Output(){ //Display data information for all students}
void Add(){ //Addition of student data information}
int Change(){ //Student data information modification}
int Delete(){ //Student data information deletion}
int Search(){ //Student data information query}
void welcome1(){//Welcome interface}
void loginstu(){//Student login}
void logintea(){//Teacher login}
void admin(){}
void loginadm(){//Administrator login}
void Menu(){
    printf("\n\n\n");
    printf("\t\t************************Welcome to the student achievement management system*************************\n\n\n");
    printf("\t\t                      1---Input of student information data\n");
    printf("\t\t                      2---Show all student information\n");
    printf("\t\t                      3---Student information data addition\n");
    printf("\t\t                      4---Student information data modification\n");
    printf("\t\t                      5---Student information data deletion\n");
    printf("\t\t                      6---Student information data query\n");
    printf("\t\t                      0---Exit the system\n");
    printf("\n\n\n\t\t*************************************************************************");
    printf("\n\n Please at 0-8 Select in and end with enter\n");
}
void Menu2(){}
void xuanze(){}
int main(){
	int f;
	system("color F0");
	welcome1();
	scanf("%d",&f);
    do{
        switch(f){
            case 1:logintea();
                system("pause");
                system("cls");
                Menu(); break;
            case 2:loginstu();
                system("pause");
                system("cls");
                Menu(); break;
            case 3:loginadm();
                system("pause");
                system("cls");
                Menu(); break;
            case 0:  exit(0) ;      break;
        }
        printf("\n Continue,If you want to exit the system, you can choose'0',And press enter\n");
        printf("\n\n Please select:\n");
        scanf("%d",&f);
    }while(f!=0);
	return 0;	
}

Keywords: C Algorithm

Added by ukscotth on Sat, 25 Dec 2021 01:49:05 +0200