OOP - Practical Paper
OOP - Practical Paper
1 15 POINTS
Government of Punjab has announced e-Government system in all offices. Benazir Bhutto Hospital has
started maintaining its doctor’s record in digital files instead of traditional files.
You are hired to develop a menu driven program for managing on job doctor’s records.
The program should facilitate adding new doctor record in a file (2 POINTS), display all doctors’ record
(2 POINTS), fetching doctor’s record from a file using searching and displaying it on screen (if the record
found your system print the whole information of that employ otherwise give the message “record not
found”) (2 POINTS), changing doctor’s status (on job/ on leave) (2 POINTS), and displaying top five
highly paid doctors in BBH (using sorting) (2 POINTS).
The doctors have following attributes (2 POINTS)
Doctor_ID (an integer)
Doctor_Name (single name and max of 20 characters)
Doctor_status (max of 15 characters)
Doctor_Salary (floating point)
Your program stores all the records in the file BBH_Doctors.text. Assume that user wants to enter several
records and then print or search them (your program ask the user do you want to continue Y/N) (3
POINTS).
QUESTION NO. 2 5 POINTS
In Question No. 1, we are adding the data into a file name BBH_Doctors.text, you have to add the exception
handing to check if the file is not opening, your program will display the file name and a message that the
file is not opening.
Also you have to add the exception handing where the user will search for the record, if record is not found,
your program will show the message, enter the Correct Name of the Doctor to Find.