Skip to content

Razwanul30/Medium-Level-MessTrack-Student-Meal-Billing-System

Repository files navigation

Mess Management System (C Project)

A modular Mess Management System written in C, designed for university-level project submission. The system uses a clean layered architecture with separate modules for students, meals, billing, file handling, and authentication. All student data is stored in a binary file (students.bin).


Project Structure

MessSystem/
│
├── main.c
├── auth.c
├── student.c
├── meal.c
├── billing.c
├── file_handler.c
│
├── config.h
├── auth.h
├── student.h
├── meal.h
├── billing.h
├── file_handler.h
│
└── data/
    └── students.bin

Features

1. Student Management

  • Add new student
  • View all students
  • Update student room
  • View individual student profile

2. Meal Management

  • Add meals for each student
  • Automatically updates meal count

3. Billing System

  • Calculates bill based on number of meals
  • Uses fixed meal rate (modifiable in config.h)
  • Stores updated bill inside student record

4. File Handling

  • Binary file based storage (students.bin)
  • Safe read/write operations
  • Auto-create data file if missing
  • Search student by ID

5. Authentication (Simple Menu Based)

  • Admin panel
  • Student login (ID-based access)

How It Works

Student Structure

Defined in config.h:

typedef struct {
    int id;
    char name[50];
    int room;
    int mealCount;
    float bill;
} Student;

Billing Formula

bill = mealCount × MEAL_RATE

You can change the meal rate from:

#define MEAL_RATE 50.0f

How to Compile

If you're using GCC:

gcc main.c auth.c student.c meal.c billing.c file_handler.c -o mess

Then run:

./mess

Admin Menu

1. Add Student
2. View Students
3. Update Room
4. Add Meal
5. Calculate Bills
0. Exit

Student Menu

1. View Profile
2. View Bill
0. Exit

Data Storage

All data is stored in:

data/students.bin

This file is created automatically.


Notes

  • No password required for login.
  • Admin and Student menus are separated.
  • System is fully modular for easy maintenance.

Future Improvements (Optional for Higher Marks)

  • Add password-based login
  • Add monthly meal reset
  • Export bill report to text file
  • Search student by name
  • Delete student

Conclusion

This Mess Management System demonstrates:

  • Modular C programming
  • File handling with binary data
  • Menu-driven navigation
  • Student and meal management
  • Dynamic bill calculation

It is suitable for academic submission or extension as a real project.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages