Question: (Must be in Java programming language) Please note that you MUST use dialog boxes for all data input To help with the program design, you
(Must be in Java programming language)
Please note that you MUST use dialog boxes for all data input
To help with the program design, you should write the code in the following steps:
Define the data
Read in all needed data
Perform calculations
Print Results
You are to write a program concerning Doctors doing various surgeries. You will read in the data, calculate various items and use if statements for printing of some requirements
Define the data:
-declare all data that you will be reading in or calculating
Read in all needed data:
-Read in the number patients having knee surgery
-Read in the fee charged to each of the knee patients (assume the same fee for knee surgery was charged to each patient)
-Read in the name of the Doctor doing the knee surgeries
-Read in the number patients having hip surgery
-Read in the fee charged to each of the hip patients (assume the same fee for hip surgery was charged to each patient)
-Read in the name of the Doctor doing the hip surgeries
-Read in the number patients having heart surgery
-Read in the fee charged to each of the heart patients (assume the same fee for heart surgery was charged to each patient)
-Read in the name of the Doctor doing the heart surgeries
Perform calculations:
-Calculate the total fees paid for the knee patients
-Calculate the total fees paid for the hip patients
-Calculate the total fees paid for the heart patient
-Calculate the average of all fees
Print Results:
-Print all of the data read in
-Print the total fees paid for the knee patients
-Print the total fees paid for the hip patients
-Print the total fees paid for the heart patient
-Print the average of all fees paid
-Print the type of surgery that had the highest fees paid
-Print the type of surgery that was done the most
-Print the Doctor who had the highest fees
-Print the Doctor who did the most surgeries
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
