Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A hospital maintains the patient and the IPD details using two distinct classes. The Patient class has name, age and gender as its constituent attributes

A hospital maintains the patient and the IPD details using two distinct classes. The Patient class has name, age and gender as its constituent attributes while the IPD class has wardNumber, bedNumber and chargePerDay as its attributes. BillingInfo is a special class that is used to compute the total charges a patient has to pay and also displays the patient details and IPD details of the corresponding patient. The BillingInfo class has noOfDaysAdmitted as an attribute and computes the total
bill as a product of chargePerDay and noOfDaysAdmitted. The hospital also provides 10% discount if a patients bill exceeds 1,00,000. Write a C++ program to accept the patient and IPD details of any number of users (take the no.of patients as an user input at beginning) and display the billing details.
NOTE: Use the concepts of inheritance.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions