CSE115.20 Lab Project
CSE115.20 Lab Project
Group Members
Name ID
Hasibul Hassan Siam 1921905043
Hasibul Islam 2021966642
Saiyaf Hossain Sami 2312646642
1. Loading Records
When the system starts, it attempts to load existing food item records from a binary file named
foodcourt.dat. If the file is not found, the system initializes with no records, displaying a message
indicating that it is starting fresh. This feature ensures that previously saved data is retained across
sessions.
2. Viewing Records
Users can view all the food items currently stored in the system. Each food item includes:
The system displays these details in a readable format, allowing users to see all the available food items
and their associated information at a glance.
Users can add new food items to the system. The process involves:
Before adding a new record, the system checks to ensure that the ID provided is unique. If the ID already
exists, the user is informed, and the record is not added. This prevents duplication and ensures data
integrity.
4. Searching Records
The system allows users to search for a specific food item by its ID. If a matching record is found, the
details of the food item are displayed. If no matching record is found, the system informs the user that
the record does not exist. This feature helps users quickly locate specific items without scrolling through
all records.
5. Updating Records
Users can update the details of an existing food item by entering its ID. If the ID is found, the system
prompts the user to enter new values for the name and price of the item. This feature allows for easy
modifications to existing records, ensuring that the food item information remains current and accurate.
6. Deleting Records
To delete a record, users must enter the ID of the food item they wish to remove. If the ID is found, the
record is deleted, and the system shifts subsequent records up to fill the gap, maintaining a contiguous
array of records. This feature enables users to remove outdated or incorrect entries from the system.
7. Saving Records
The system includes a feature to save all current records to the foodcourt.dat file before exiting. This
ensures that all changes made during the session are stored persistently. The file operations are designed
to handle potential errors, such as file write failures, with appropriate error messages to inform the user.
The system operates through a simple command-line interface. Users interact with the system by
entering numeric choices corresponding to different actions, such as viewing records, adding a new
record, or exiting the system. Each action is followed by prompts for further input, guiding users through
the necessary steps to complete their tasks.
• Input Validation: Ensures that IDs are integers, prices are positive numbers, and names do not
overflow the buffer.
• File Operations: Handles errors during file read/write operations, providing informative
messages to the user.
• Unique ID Enforcement: Prevents adding records with duplicate IDs, ensuring the integrity
of the data.
This Food Court Management System is ideal for small to medium-sized food courts that require a
straightforward, low-cost solution for managing their food items. It is particularly useful in
environments where advanced graphical interfaces are unnecessary or impractical. The system's ease
of use, combined with its essential features for managing food items, makes it a valuable tool for food
court operators to maintain accurate and up-to-date records of their offerings.
Flowchart:
Future improvements we are planning:
There are several enhancements and improvements that can be made to the Food Court
Management System in future iterations to increase its functionality, usability, and
robustness. Here are some suggestions:
By incorporating these improvements, the Food Court Management System can become more
powerful, user-friendly, and suitable for a wider range of use cases, from small food courts to large,
complex operations.