RCMS.cpp
/*************************TEACHER FUNCTION*************************/
/*
If a user enterred the Teacher password correctly, they are granted Teacher access

As a Teacher, the user is able to add a new record, delete a record, search for a specific record,
and modify a specific record. They are also able to display all records, and display the class statistics

Depending on the choice they enter on the input, they will go to a function for the particular operations
*/
TEACHER FUNCTION
If a user enterred the Teacher password correctly, they are granted Teacher access

As a Teacher, the user is able to add a new record, delete a record, search for a specific record,
and modify a specific record. They are also able to display all records, and display the class statistics

Depending on the choice they enter on the input, they will go to a function for the particular operations
TEACHER FUNCTION If a user enterred the Teacher password correctly they are granted Teacher access As a Teacher the user is able to add a new record delete a record search for a specific record and modify a specific record . They are also able to display all records and display the class statistics Depending on the choice they enter on the input they will go to a function for the particular operations
void Teacher() {
    int n = -1;
    while (n != 7){
        cout << "\t\t\t\t  ------------" << "\n";
        cout << "\t\t\t\t      MENU" << "\n";
        cout << "\t\t\t\t  ------------" << "\n";
        cout << "\t\t\t     1. ADD A NEW RECORD" << "\n";
        cout << "\t\t\t     2. SEARCH FOR A RECORD" << "\n";
        cout << "\t\t\t     3. MODIFY A RECORD" << "\n";
        cout << "\t\t\t     4. DELETE A RECORD" << "\n";
        cout << "\t\t\t     5. DISPLAY ALL THE RECORDS" << "\n";
        cout << "\t\t\t     6. CLASS STATISTICS" << "\n";
        cout << "\t\t\t     7. GO TO MAIN MENU" << "\n\n";
        cout << "\t\t\t     ENTER YOUR OPTION: ";
        cin.clear();
        cin.ignore(numeric_limits<std::streamsize>::max(), '\n');
        char choice_string[2];
        cin.getline(choice_string, 2);
        n = atoi(choice_string);
        switch (n) {
            case 1:
                add();
                break;
            case 2:
                search();
                break;
            case 3:
                modify();
                break;
            case 4:
                del();
                break;
            case 5:
                display_all();
                break;
            case 6:
                statistics();
                break;
            case 7:
                Segregation();
                break;
            default:
                cout << "\t\t\t\tWRONG OPTION!";
        }
    }
}
void Teacher ( ) { int n = -1 ; while ( n != 7 ) { cout << " \t \t \t \t " << " \n " ; cout << " \t \t \t \t " << " \n " ; cout << " \t \t \t \t " << " \n " ; cout << " \t \t \t " << " \n " ; cout << " \t \t \t " << " \n " ; cout << " \t \t \t " << " \n " ; cout << " \t \t \t " << " \n " ; cout << " \t \t \t " << " \n " ; cout << " \t \t \t " << " \n " ; cout << " \t \t \t " << " \n \n " ; cout << " \t \t \t " ; cin . clear ( ) ; cin . ignore ( numeric_limits < std :: streamsize > :: max ( ) , ' \n ' ) ; char choice_string [ 2 ] ; cin . getline ( choice_string , 2 ) ; n = atoi ( choice_string ) ; switch ( n ) { case 1 : add ( ) ; break ; case 2 : search ( ) ; break ; case 3 : modify ( ) ; break ; case 4 : del ( ) ; break ; case 5 : display_all ( ) ; break ; case 6 : statistics ( ) ; break ; case 7 : Segregation ( ) ; break ; default : cout << " \t \t \t \t " ; } } }
TEACHER FUNCTION
If a user enterred the Teacher password correctly, they are granted Teacher access
TEACHER FUNCTION If a user enterred the Teacher password correctly they are granted Teacher access