Sneak Peak Of My Machine Problem

from the file prototype.h

 


/*
**Name:             Mark Anthony A. Cabanlit
**Student Number:   2010-35479
**Date Began:       October 2, 2010
**Date Finished:    October 12, 2010
**File description: This .h file contains all the function declarations
                        of Machine_Problem.c
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX 100

struct STUDENT {
    int stud_number;
    char last_name[30];
    char first_name[30];
    char birthday[30];
    char course[30];
}stud[MAX];

void overall();

/*
**Function Name:
**Function Description:
**Description of Parameters:
**Description of Return Value:
**Date Began:
**Date Finished:
*/

void introSRMS();
/*
**Function Name: introSRMS
**Function Description: Prints the name and description of the program.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 2, 2010
**Date Finished: October 2, 2010
*/

int choiceMain();
/*
**Function Name: choiceMain
**Function Description: Enables user to input his choice on
                            what to do with the program.
                            (e.g. Add, Modify, etc.)
**Description of Parameters: No parameters.
**Description of Return Value: int, value of selected operation.
**Date Began: October 2, 2010
**Date Finished: October 2, 2010
*/

int vacantSlots();
/*
**Function Name: vacantSlots
**Function Description: Checks the latest vacant value of the array of
                            structures. Somewhat the same with static int.
**Description of Parameters: No parameters.
**Description of Return Value: int, the number of students inside the
                            structure.
**Date Began: October 2, 2010
**Date Finished: October 3, 2010
*/

void inputValues();
/*
**Function Name: inputValues
**Function Description: Allows user to input the information of a student.
                            Prompts user if the student number already
                            exists.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 2, 2010
**Date Finished: October 4, 2010
*/

void modifyMain();
/*
**Function Name: modifyMain
**Function Description: Allows user to choose on what to modify.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 7, 2010
**Date Finished: October 7, 2010
*/

int modifyGet();
/*
**Function Name: modifyGet
**Function Description: Verifies the student number to be
                            modified by the user.
**Description of Parameters: No parameters.
**Description of Return Value: int, location of the student number if
                            it holds true but returns -1 if false.
**Date Began: October 7, 2010
**Date Finished: October 7, 2010
*/

void modifyAll(int);
/*
**Function Name: modifyAll
**Function Description: Modifies the student number, name, course
                            and birthday of a student given its student
                            number as input.
**Description of Parameters: int, the address of the student to be
                            modified.
**Description of Return Value: No return value.
**Date Began: October 7, 2010
**Date Finished: October 8, 2010
*/

void modifyLast(int);
/*
**Function Name: modifyLast
**Function Description: Modifies last name of a student given its student
                            number as input.
**Description of Parameters: No parameters.
**Description of Return Value: int, the address of the student to be
                            modified.
**Date Began: October 7, 2010
**Date Finished: October 7, 2010
*/

void modifyFirst(int);
/*
**Function Name: modifyFirst
**Function Description: Modifies first name of a student given its student
                            number as input.
**Description of Parameters: No parameters.
**Description of Return Value: int, the address of the student to be
                            modified.
**Date Began: October 7, 2010
**Date Finished: October 7, 2010
*/

void modifyCourse(int);
/*
**Function Name: modifyCourse
**Function Description: Modifies course of a student given its student
                            number as input.
**Description of Parameters: No parameters.
**Description of Return Value: int, the address of the student to be
                            modified.
**Date Began: October 7, 2010
**Date Finished: October 7, 2010
*/

void modifyBirthday(int);
/*
**Function Name: modifyBirthday
**Function Description: Modifies birthday of a student given its student
                            number as input.
**Description of Parameters: No parameters.
**Description of Return Value: int, the address of the student to be
                            modified.
**Date Began: October 7, 2010
**Date Finished: October 7, 2010
*/

void displayAll();
/*
**Function Name: displayAll
**Function Description: Dislays all the student number, first name,
                            family name, birthdate, and course.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 3, 2010
**Date Finished: October 4, 2010
*/

void displayOne();
/*
**Function Name: displayOne
**Function Description: Dislays the student number, first name,
                            family name, birthdate, and course
                            of a certain student given his student
                            number.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 3, 2010
**Date Finished: October 4, 2010
*/

void displayMain();
/*
**Function Name: displayMain
**Function Description: Allows user to select what to display.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 4, 2010
**Date Finished: October 4, 2010
*/

void eraseAll();
/*
**Function Name: eraseAll
**Function Description: Allows user to delete all datas inside
                            the program but before deleting, it asks
                            the user to confirm the said task.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 4, 2010
**Date Finished: October 5, 2010
*/

void eraseOne();
/*
**Function Name: eraseOne
**Function Description: Allows user to delete the information
                            of one student given his student number
                            and the function also prompts the user
                            if the student does not exist.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 5, 2010
**Date Finished: October 6, 2010
*/

void eraseMain();
/*
**Function Name:eraseMain
**Function Description: Allows user to select what to erase.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 6, 2010
**Date Finished: October 6, 2010
*/

void bubbleSort(struct STUDENT stud[], int);
/*
**Function Name: bubbleSort
**Function Description: Arranges the student numbers in
                            increasing order together with
                            their other attributes.
**Description of Parameters: struct, the main structure that
                            contains all the collected data.
                            int, size or the number of entries inside
                            the struct.
**Description of Return Value: No return value.
**Date Began: October 2, 2010
**Date Finished: October 12, 2010
*/

void loadArray(struct STUDENT stud[]);
/*
**Function Name: loadArray
**Function Description: Loads the array from records.txt to
                            the program.
**Description of Parameters: struct, the main struct used in the program.
**Description of Return Value: No return value.
**Date Began: October 9, 2010
**Date Finished: October 9, 2010
*/

void displayArray(struct STUDENT stud[]);
/*
**Function Name: displayArray
**Function Description: displays the information gathered from the
                            the program to records.txt
**Description of Parameters: struct, the main struct used in the program.
**Description of Return Value: No return value.
**Date Began: October 9, 2010
**Date Finished: October 9, 2010
*/

void space();
/*
**Function Name: space
**Function Description: Prints "\n" or enter.
**Description of Parameters: No parameters.
**Description of Return Value: No return value.
**Date Began: October 2, 2010
**Date Finished: October 2, 2010
*/