Sie sind auf Seite 1von 6

Hostel Management System Design Document

Background
This project is a Hostel Management system to maintain the details about rooms, student details, allotment of rooms.

1. High level design


This section describes the high level design of the Hostel Management System. The system has the following modules:

1. Login: Accepts the user id and password. Validates the user id and password. If valid then
main menu is displayed. Otherwise a suitable error message is displayed. There are three maximum attempts given. 2. Main Menu: Displays the main menu to the user and handles users actions in main menu. Depending on users selection, Student Details Menu, Room Details Menu, Allotment Details Menu, Reports Menu is displayed. 3. Student Details Menu: Once the student Menu is chosen, the user is given the option of add student details, update student details, view all student details, and go to main menu. The Add Student Details allow the student name, student id, address and fee status. 4. Room Detail Menu: Once the Room Detail Menu is chosen, the user is given the option to view the details of the rooms. The details include room-type, Number of students and fees. 5. Allotment Details Menu: Once the Allotment Menu is chosen, the user is given the option of performing a new allotment, updating a previous one and viewing the current allotment details-student id, room no., date of allotment and date of surrender.

2. Detailed Design
This section describes the detailed design of the various modules in the Library Management System. Function: main Parameters int argc, char** argv Return Values integer Return code to OS Description Opens the room(room.txt), student (student.txt) and allotment of room (allotmant.txt) files so that it can be used by all other functions. It shows the login to the user. If the login is successful after validating the username and the password,the main menu is displayed. If three attempts to login are invalid, the program is terminated Calling Function .

Login module

Functions called by this function

fnLogin

Function: fnLogin Parameters Return Values Description

None None
Accepts the user id and the password from the user. If the user id and password are valid, then it returns back to the calling function. If after three attempts to relogin fails, it exits the program

Calling Function Functions called by this function

Main fnMainMenu

Function: fnMainMenu Parameters None Return Values Description

None
Displays the main menu. Then waits for users input using scanf function. Until the user types in a selection, control will not be returned to the calling function.Calls fnStudentDetailsMenu to display the Student Details Menu. Calls fnRoomDetailsMenu to display the Room Details Menu. Calls fnAllotmentMenu to display Allotment Details Menu. Calls fnReportsMenu to display Reports Menu.

Calling Function Functions called by this function

Main fnStudentDetailsMenu,fnRoomDetailsMenu.fnAllotmentMenu,fnReportsMenu

2. Student Details Menu


Function: fnStudentDetailsMenu Parameters None Return Values Calling Function

None
fnMainMenu

Description

Displays the Student Details menu. Then waits for users input using scanf function. On selection the desired function is called and the menu displayed. fnAddStudent , fnViewAllStudents

Functions called by this function

Function: fnAddStudent Parameters None Return Values Description

None
Displays the Add Student menu. The function gets the student details from the user and writes the details to the student.txt file. After writing a record into the student.txt file it displays a successful message. After done it passes the control back to the calling function.

Calling Function Functions called by this function

fnStudentDetailsMenu
fnOpenFile , fnReadFile , fnWriteFile , fnCloseFile

3. Room Detail Menu


Function: fnRoomDetailsMenu Parameters None Return Values Calling Function Description Functions called by this function

None
fnMainMenu

Displays the Room Details menu. About the type of room, no.of student, facilities and fees status. none

4. Allotment Detail Menu

Function: fnAllotmentMenu Parameters None Return Values Calling Function Description Functions called by this function

None
fnMainMenu

Displays the Allotment menu. Then waits for users input using scanf function. On selection the desired function is called and the menu displayed. fnNewAllotment, fnViewAllotment

Function: fnNewAllotment Parameters None Return Values Description

None
Displays the Allotment menu. The function gets the student id from the user and allots a room available and writes in the allotment.txt file. After writing a record it displays a successful message. After done it passes the control back to the calling function.

Calling Function Functions called by this function

fnAllotmentMenu
fnOpenFile , fnReadFile , fnWriteFile , fnCloseFile

5. Report Details Menu


Function: fnRoomView Parameters None Return Values Description Calling Function Functions

None
Displays the Room Allotment Status. It displays the total number of rooms, how many of them are occupied and how many are not.

fnMainMenu
fnOpenFile , fnReadFile , fnWriteFile , fnCloseFile

called by this function

Das könnte Ihnen auch gefallen