Hospital Charges:

The idea of this program is to use functions and overloaded functions to display the calculated charges of a trip to the hospital for an inpatient or an outpatient. Since I had yet to use switch statements in my programming challenges, I decided that I would also figure out how to incorporate the use of switch statements for this challenge as well.

Write a program that computes and displays the charges for a patient’s hospital stay. The following data should be entered:

  • The number of days spent in the hospital
  • The daily rate
  • Hospital medication charges
  • Charges for hospital services (lab tests, etc.)

The program should ask for the following data if the patient was an outpatient:

  • Charges for hospital services (lab tests, etc.)
  • Hospital medication charges

Input Validation: Do not accept negative numbers for any data.