Suppose you own a hospital, and you have 30 doctors appointed in the hospital. You need to maintain the record of all the registered doctors and display their data when required. Create a structure Doctor, containing registration number (int), name (char []), address(nested), date of joining(nested) as structure members. Write a program that accomplish the following tasks 1.      Main function should ask the user to enter id and password to proceed further. 2.      Main function should display a menu either to enter the record or display the record. Program should call the function according to user’s choice. 3.      If user chooses to enter the record, program should store the data in a structure array of 30 members. Program should ask the user if he wants to enter the next record. 4.      If user chooses to display the record and there is record present, program should display the list of record (in ascending order of date of joining), if there is no record present then it should display a message of “no record found”. 5.      Record displayed by point number 4 should be sorted in descending order of date of joining of doctors by using a sort function.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section: Chapter Questions
Problem 3PP
icon
Related questions
Question

Suppose you own a hospital, and you have 30 doctors appointed in the hospital. You need to maintain the record of all the registered doctors and display their data when required. Create a structure Doctor, containing registration number (int), name (char []), address(nested), date of joining(nested) as structure members. Write a program that accomplish the following tasks

1.      Main function should ask the user to enter id and password to proceed further.

2.      Main function should display a menu either to enter the record or display the record. Program should call the function according to user’s choice.

3.      If user chooses to enter the record, program should store the data in a structure array of 30 members. Program should ask the user if he wants to enter the next record.

4.      If user chooses to display the record and there is record present, program should display the list of record (in ascending order of date of joining), if there is no record present then it should display a message of “no record found”.

5.      Record displayed by point number 4 should be sorted in descending order of date of joining of doctors by using a sort function.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Types of trees
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr