Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Client Specifications: At Billy’s Therapy Services we strive to give our patient

ID: 3622460 • Letter: C

Question

Client Specifications: At Billy’s Therapy Services we strive to give our patients premium care. On top of their health, we are a business and need to turn a profit. We would like you to create a program that will accurately bill a patient based on the number of visits,
insurance type and other conditions that affect the bill.
There are three major sections we need for this program to be complete.
#1: Personal Information
To process a patient’s bill, we need their name, phone number, patient number and insurance type.
#2: Billing Information
For the bill to be computed we need to know the number of visits the patient had, the type of therapy offered during that visit and what insurance they have.
Therapy Type & Price Per Visit Insurance Company & % Ins. pays
Manual $80.00 Blue Cross Blue Shield 85%
Mobilization $88.00 United Health Care 70%
Stretching $120.00 Advantage 65%
Strengthening $120.00 Relatives of Billy’s Therapy Services 100%
Electric Stem $82.00

#3: Receipt information
After the appropriate data is gathered, a receipt should show detailed information about the patient’s therapy bill. All of their personal information as well as the totals for their bill should be displayed. They need to see the amount that was billed, the amount the insurance company paid for and then the amount they owe to Billy’s Therapy Services.
Instructions:
The following instructions will take you step by step on what you need to accomplish to complete this assignment. You will be graded on neatness and creativity as well as correctness of code.
Follow each of these steps and you should have a complete working program.
#1: Comments: Include a comment header at the beginning of your code that has your name, date, project name, course number, and a detailed description of what the program will accomplish (one sentence is not detailed).
Place comments as needed throughout the code. They should be placed when
information in the code is not intuitive to the viewer. For example, the viewer might not
know what the percentages you are using are for. Maybe you comment on how you are
calculating the bill’s amount. Be responsible with your comments.
#2: Variables: you will create two arrays.
• A string array to hold insurance types
• A string array to hold therapy types
You will also have two other arrays to hold the insurance percentages and the therapy
amount billed per visit.
• A double array to hold insurance percents
• An int array to hold therapy charges
• Each of the above arrays should match their respective numbers to the same
index in the respective type array. For example:
o insuranceTypes[0] = “Blue Cross Blue Shield”;
o insurancePercents[0] = .85;
Lastly, you will create two new variables that will hold the index value of the selected
insurance and therapy types.
• An int to hold the index selected for insurance
• An int to hold the index selected for therapy
o For example: when the user types in the menuItem =1 to select Blue
Cross Blue Shield you will assign insuranceIndex = menuItem-1; Now if
you were to print the insurance type you would print
insuranceType[insuranceIndex]; or if you needed to know the percentage
their insurance pays insurancePercents[insuranceIndex];
#3: Main Menu: In the main method, you will need to create a main menu. This menu will ask the user to type 1 to enter a new patient and 0 to exit. Use a loop to loop this menu until the user types 0. (HINT: use a while or do/while loop)
#4: Form: For each therapy and insurance type you will create a new method. These methods will perform the following tasks:
1. Use a loop to display the types of insurance/therapy using the array you created
earlier.
2. Read in the user input.
3. Use a loop to determine if they entered valid input. The loop will not terminate
unless valid input has been entered. You will need to use logical operators as well
as the possible indexes for the arrays to determine if the user entered correct
data.
4. When a correct number is entered, this will become the index for that array and
this is the data that you will return to the main method.
#5: Calculations: You will be creating a method for each calculation you make.
1. A method to calculate the total bill. This is based on the patient’s number of
visits and the type of therapy.
2. A method will calculate how much insurance pays based on the insurance type.
3. A method to calculate the patient’s portion of the bill.
For each of the above methods you will need to pass the methods any data. For example
the first method needs to know the number of visits and the amount charged per visit
according to therapy type. Here are two possible ways to build your method:
public static double calculateBillTotal(int numberOfVisits, int[]
therapyChargesPerVisit, int therapyIndex)
{}
public static double calculateBillTotal(int numberOfVisits, int therapyCharge)
{}
This is how you would call each of those methods from another method:
totalBill = calculateTotalBill(numberOfVisits, therapyCharges, therapyIndex);
totalBill = calculateTotalBill(numberOfVisits, therapyCharges[therapyIndex]);
#6: Printing the Bill: You will create a method to print the bill for the therapy client. This method will need
several parameters. You will need the patient number, name, phone number, number of
visits, insurance types array, insurance percentages array, therapy types array, therapy
charges array, insurance index, and therapy index.
Print each of the parameters in the bill. The last three items to be printed are the total
bill, insurance payment and client payment. These three amounts are determined by
calling the methods created in step 5.
#7 Example Output
Patient chose:
Insurance Type: Blue Cross Blue Shield
Therapy Type: Stretching
Total Visits: 10
Calculations:
Total Bill: $1200.00
Insurance Pays: $1020.00
Patient Pays: $108.00
*******************************************
** Billy's Therapy Services **
*******************************************
** 1. New Patient **
** 0. Exit **
** 1
*******************************************
** Billy's Therapy Services **
*******************************************
*******************************************
** Patient Information: **
*******************************************
** First Name: Jimmy
** Last Name: John
** Phone: 908-099-8768
** Patient Number: 3426
** 1. Blue Cross Blue Shield
** 2. United Health Care
** 3. Advantage
** 4. Relatives of Billy's Therapy Services
1
** Number Of Visits: 10
** 1. Manual
** 2. Mobilization
** 3. Stretching
** 4. Strengthening
** 5. Electric Stem
3
*******************************************
** Patient #3426 Bill: **
*******************************************
*******************************************
** Name: Jimmy John
** Phone: 908-099-8768

Explanation / Answer

Dear, import java.util.*; public class BillysReceiptGenerator { public static void main(String[] args) { /***************************/ /*** Declare Variables ***/ /***************************/ String patientFirstName, patientLastName, patientPhoneNumber; String [] therpyType ={ "Manual Mobilization", "Stretching","Strengthening", "Electric Stem"}; String [] insuranceCompany={"Blue Cross Blue Shield", "United Health Care", "Advantage","Relatives of Billy’s Therapy Services" }; double [] insurancePercents={.85,.7,.65,1}; int []therapyCharges={80,88,120,120,82}; int menuItem=0; int menuItem2=0; int insuranceIndex = menuItem-1; int therapyIndex=menuItem2-1; int patientNumber, numberOfVisits=0; int patientCode=-1; double totalBill=0, billAmountInsurancePays=0; double billAmountPatientPays=0; Scanner input = new Scanner(System.in); /***************************/ /*** Gather Patient Data ***/ /***************************/ System.out.println("*******************************************"); System.out.println("** Billy's Therapy Services **"); System.out.println("*******************************************"); while(patientCode!=0){ System.out.println("Enter Code"); System.out.println("1. New Patient"); System.out.println("0. Exit"); patientCode=input.nextInt(); if(patientCode == 0) System.exit(0); System.out.println("*******************************************"); System.out.println("** Billy's Therapy Services **"); System.out.println("*******************************************"); System.out.println("*******************************************"); System.out.println("** Patient Information: **"); System.out.println("*******************************************"); System.out.print ("** First Name: "); patientFirstName = input.next(); System.out.print ("** Last Name: "); patientLastName = input.next(); System.out.print ("** Phone: "); patientPhoneNumber = input.next(); System.out.print ("** Patient Number: "); patientNumber = input.nextInt(); therpyTypeList(insuranceCompany,menuItem); TherpyCompanyList(therpyType,menuItem2); numberOfVisits = numberOfVists(); totalBill=totalBill(numberOfVisits,therapyCharges,therapyIndex); insurancePament(insurancePercents, totalBill, insuranceIndex,billAmountInsurancePays); patientBill( billAmountPatientPays, billAmountInsurancePays, totalBill); printbills( patientFirstName,patientPhoneNumber, patientNumber, patientLastName, patientPhoneNumber, therapyIndex, insuranceCompany, therpyType, totalBill, billAmountInsurancePays, billAmountPatientPays,insuranceIndex ); } } public static int therpyTypeList(String [] insuranceType,int menuItem){ Scanner input = new Scanner(System.in); int counter=0; int therpyCounter=1; for(counter=0;counter=1||menuItem
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote