Assignment # 5
Student Hostel Management System
Create, Read, Update and Delete the file records by using sequential/random file access
procedures. (CLO4-C5-PLO3)
Problem Statement
The university hostel management wants to automate their record-keeping system for
students residing in the hostel. Currently, all records are managed manually, making it
difficult to efficiently update or search for student information.
You are required to design and implement a console-based C++ application that manages
the records of hostel residents using file handling techniques (both sequential and random
file access, as needed). The system should allow hostel staff to:
• Create (Add) new student records
• Read (View/Search) existing records
• Update the information of any student (e.g., change room number, update phone
number)
• Delete records of students who have vacated the hostel
Each student record should contain at least the following fields:
• Student ID (Unique, e.g., registration number)
• Name
• Room Number
• Phone Number
Requirements:
1. All records must be stored persistently in a file (binary/text as per your design
choice).
2. The application must provide a menu-driven interface with the following
functionalities:
• Add New Record: Enter and save new student data to the file.
• Display All Records: Read and display all records from the file.
• Search Record: Search for a student record by Student ID.
• Update Record: Modify the details of an existing student by Student ID.
• Delete Record: Remove a student’s record from the file by Student ID.
3. The system should handle file operations efficiently and demonstrate the use of
both sequential (e.g., displaying/searching all records) and random (e.g., direct
modification/deletion of a particular record) file access methods.
4. Properly handle all edge cases (e.g., duplicate Student IDs, invalid input, record not
found).
5. Write clear comments and structure your code for readability.
Deliverables
• Source code (.cpp file) implementing all specified functionalities.
• Screenshots of program output for each feature (add, read, update, delete, search).
• Short report (1–2 pages) describing:
o The file handling approach you used (sequential, random, or both, with
explanation)
o Major challenges faced and how you overcame them
Marking Rubric (suggested breakdown)
Criterion Marks
Correct implementation of file operations 10
(CRUD)
Use of both sequential and random file 5
access
Proper menu-driven interface & error 5
handling
Code readability, comments, modularity 3
Report and screenshots 2
Instructions for Submission
• Submit your .cpp source file, screenshots, and report in a single zipped folder
named: HostelMgmt_<YourRollNo>.zip
• Deadline: 29-06-2025