Hospital Directory. Develop a directory look-up program for Community General Hospital. Create multiple 1D arrays, predefined with the following information (table below). The ID column serves as a common index; the rest of the columns should be stored in individual arrays of the appropriate data type (especially important for the last column!). You will then use a loop to create a menu that repeatedly gives the user the following choices:  List all employee records (in order)  Display an employee record by ID ◦ The user should enter a valid ID. If the employee exists, print out their information. Otherwise, tell the user that it is an invalid ID  Display an employee record by last name ◦ The user should enter a valid last name. If employee(s) exist, print out their information. Otherwise, tell the user that there are no records.  Quit Sample Output: [Community General Hospital Directory] 1) List all employees 2) Search employee records by ID 3) Search employee records by Last Name 4) Quit Choice: 1 #0: Mark Sloan, Age 67, Chief of Internal Medicine, Medical License: TRUE #1: Amanda Bentley, Age 33, Pathologist, Medical License: TRUE #2: Norman Briggs, Age 47, Administrator, Medical License: FALSE #3: Steven Sloan, Age 35, Hospital Security, Medical License: FALSE #4: Jesse Travis, Age 24, Surgeon Intern, Medical License: TRUE 1) List all employees 2) Search employee records by ID 3) Search employee records by Last Name 4) Quit Choice: 2 ID: 10 Invalid ID! ID: 1 #1: Amanda Bentley, Age 33, Pathologist, Medical License: TRUE 1) List all employees 2) Search employee records by ID 3) Search employee records by Last Name 4) Quit Choice: 3 Last Name: Stewart No Records Found! 1) List all employees 2) Search employee records by ID 3) Search employee records by Last Name 4) Quit Choice: 3 Last Name: Sloan #0: Mark Sloan, Age 67, Chief of Internal Medicine, Medical License: TRUE #3: Steven Sloan, Age 35, Hospital Security, Medical License: FALSE 1) List all employees 2) Search employee records by ID 3) Search employee records by Last Name 4) Quit Choice: 5 No option 5! Choice: 4 [Closing Directory...]

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Hospital Directory.

Develop a directory look-up program for Community General Hospital. Create multiple 1D arrays, predefined with the following information (table below).

The ID column serves as a common index; the rest of the columns should be stored in individual arrays of the appropriate data type (especially important for the last column!).
You will then use a loop to create a menu that repeatedly gives the user the following choices:
 List all employee records (in order)
 Display an employee record by ID
◦ The user should enter a valid ID. If the employee exists, print out their information. Otherwise, tell the user that it is an invalid ID
 Display an employee record by last name
◦ The user should enter a valid last name. If employee(s) exist, print out their information. Otherwise, tell the user that there are no records.
 Quit

Sample Output:
[Community General Hospital Directory]
1) List all employees
2) Search employee records by ID
3) Search employee records by Last Name
4) Quit
Choice: 1
#0: Mark Sloan, Age 67, Chief of Internal Medicine, Medical License:
TRUE
#1: Amanda Bentley, Age 33, Pathologist, Medical License: TRUE
#2: Norman Briggs, Age 47, Administrator, Medical License: FALSE
#3: Steven Sloan, Age 35, Hospital Security, Medical License: FALSE
#4: Jesse Travis, Age 24, Surgeon Intern, Medical License: TRUE
1) List all employees
2) Search employee records by ID
3) Search employee records by Last Name
4) Quit
Choice: 2
ID: 10
Invalid ID!
ID: 1
#1: Amanda Bentley, Age 33, Pathologist, Medical License: TRUE
1) List all employees
2) Search employee records by ID
3) Search employee records by Last Name
4) Quit
Choice: 3
Last Name: Stewart
No Records Found!
1) List all employees
2) Search employee records by ID
3) Search employee records by Last Name
4) Quit
Choice: 3
Last Name: Sloan
#0: Mark Sloan, Age 67, Chief of Internal Medicine, Medical License:
TRUE
#3: Steven Sloan, Age 35, Hospital Security, Medical License: FALSE
1) List all employees
2) Search employee records by ID
3) Search employee records by Last Name
4) Quit
Choice: 5
No option 5!
Choice: 4
[Closing Directory...]

ID First Name
0 Mark
1 Amanda
2
Norman
3 Steve
4 Jesse
Last Name
Sloan
Bentley
Briggs
Sloan
Travis
Age
67
33
47
35
24
Occupation
Chief of Internal
Medicine
Pathologist
Administrator
Hospital Security
Surgeon Intern
Has Medical License?
TRUE
TRUE
FALSE
FALSE
TRUE
Transcribed Image Text:ID First Name 0 Mark 1 Amanda 2 Norman 3 Steve 4 Jesse Last Name Sloan Bentley Briggs Sloan Travis Age 67 33 47 35 24 Occupation Chief of Internal Medicine Pathologist Administrator Hospital Security Surgeon Intern Has Medical License? TRUE TRUE FALSE FALSE TRUE
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

I am very sorry, it was my mistake for not indicating that I need the code in C++ and not in Python.  Can you be so kind and write the code in C++?  Thanks

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Binary Search Algorithm
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education