Shree Ramkrishna Institute of Computer Education and Applied Sciences
S.Y.B.Sc. (Computer Science/Information Technology) Sem -4
External Practical Examination
Subject : Data Structure
Date:15/04/25 Total marks: 30 Time: 2 hours
__________________________________________________________________________
Instructions:
1. Read the entire question paper carefully, at least once.
2. Kindly keep saving your file at some intervals to avoid inconvenience
______________________________ALL THE BEST_________________________________
[ODD SET]
Q-1:-To design and implement a Hospital Management System using the
Circular Queue [20 marks]
In a hospital, the waiting room has a limited number of seats (say, 5). As
patients arrive, they are added to the waiting list. As doctors call patients in for
consultation, they are removed from the list, freeing up space. This functionality
should be implemented using a circular queue.
Add a function to count patients based on problem type (e.g., Fever, Cough,
Fracture).
Use the circular queue to:
● Count how many have a particular symptom
● Print summary report: "Fever: 2, Cough: 3, Fracture: 1"
Requirements:
1. Create a Patient class with the following attributes:
name (String)
age (int)
problem (String)
2. Create a CircularQueue class with the following methods:
enqueue(Patient) – Add a new patient to the queue
dequeue() – Remove the patient who is next to be seen
display() – Show all current patients in the waiting queue
isFull() and isEmpty() – Helper methods
3. Create a HospitalSystem class with a menu-driven interface:
Option 1: Add patient
Option 2: Call next patient
Option 3: Show all patients
Option 4. Count by Condition
Option 5: Exit
Q-2 Implement Binary Search to quickly find a patient by name and display
their details. [10 Marks]
Shree Ramkrishna Institute of Computer Education and Applied Sciences
S.Y.B.Sc. (Computer Science/Information Technology) Sem -4
External Practical Examination
Subject : Data Structure
Date: 15/04/25 Total marks: 30 Time: 2 hours
__________________________________________________________________________
Instructions:
1. Read the entire question paper carefully, at least once.
2. Kindly keep saving your file at some intervals to avoid inconvenience
______________________________ALL THE BEST_________________________________
[EVEN SET]
Q-1:-To design and implement a Bus Booking Management System using the
Simple Queue [20 marks]
In Bus Booking, the total number of seats are let us say N( example N=5).
As passengers arrive, they are allotted seats. As their destination is reached, the
seats are freed. This functionality should be implemented using a Simple queue.
Requirements:
1. Create a Passenger class with the following attributes:
○ name (String)
○ destination(String)
○ TicketCost(int)
○ Seat allocated (String)- Eg. G1, G2, G3, G4 …
2. Create a SimpleQueue class with the following methods:
○ enqueue(Passenger) – Add a new passenger to the queue
○ dequeue() – Remove the passenger
○ display() – Show all current passengers in the bus
○ Totalearnings()-Show total earnings of the bus
3. Create a Bus Booking System class with a menu-driven interface:
○ Option 1: Add passenger
○ Option 2: Remove passenger
○ Option 3: Show all passengers
○ Option 4: Total earnings of the bus.
○ Option 4: Exit
Q-2 Implement Linear Search to quickly find a passenger by name and
display their details. [10 Marks]