Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project 1 : Picking an Insurance Plan Learning Outcomes Recognize and apply the software development phases Utilize Java syntax in fundamental programming algorithms Recognize and

Project 1: Picking an Insurance Plan
Learning Outcomes
Recognize and apply the software development phases
Utilize Java syntax in fundamental programming algorithms
Recognize and apply the various input and output devices in programming
Objectives
By completing this assignment, you will gain experience with the following Java features:
Definition of a Java class
Variable declaration and assignment
Using Scanner for console input
Using JOptionPane for GUI input
The String class
if-else statements
Arithmetic expressions and data manipulations
Background
Employees often have to pick among several health insurance plans offered by their employer. Different plans are better
for different circumstances, like whether or not you are covering a family and the amount of doctor visits you expect to
make. For our purposes, there are three attributes of an insurance plan that are important:
The premium: this is how much you have to pay for a year of insurance.
The deductible: this is how much you have to pay for your doctor's bills before insurance will start paying anything.
For example, if you have a $1000 deductible, then your first $1000 worth of doctor's bills during the year will be
your responsibility to pay. If you have less than $1000 in expenses during the year, then your insurance will not pay
anything toward your bills. Otherwise, you pay the first $1000 and you and your insurance company split the cost
for the rest of the bills. How those bills are split is determined by the...
The coinsurance: this is a percentage, like 20%. After you have "met your deductible"--that is, paid doctor's bills
totaling your deductible amount--then the remaining bills for that year are split. You pay the coinsurance, and your
insurance company covers the rest.
Here are a few examples:
1. My plan has $5000 premium, $1000 deductible, and 20% coinsurance.
a. If I have no medical bills, then my health care costs are $5000(i.e., just the premium).
b. If I have $500 in medical bills, then I pay all of those (because they are less than the deductible), plus the premium.
My health care costs are $5500.
2
c. If I have $1002 in medical bills, then I pay the premium, plus my $1000 deductible, plus 20% of the bills over the
deductible (20% of $2 is $0.40). Thus, my health care costs are $6000.40.
d. If I have $15000 in medical bills, then I pay the premium, plus my $1000 deductible, plus 20% of the bills over the
deductible (20% of $14000 is $2800). Thus, my health care costs are $8800.
2. In scenario 2, suppose my plan has $3000 premium, $4000 deductible, and 25% coinsurance.
a. If I have no medical bills, then my health care costs are $3000(i.e., just the premium).
b. If I have $500 in medical bills, then I pay all of those (because they are less than the deductible), plus the premium.
My health care costs are $3500.
c. If I have $1002 in medical bills, then I pay all of those (because they are less than the deductible), plus the
premium. My health care costs are $4002.
d. If I have $15000 in medical bills, then I pay the premium, plus my $4000 deductible, plus 25% of the bills over the
deductible (25% of $11000 is $2750). Thus, my health care costs are $9750.
Project Description
For this project, you will build a program that computes the health care costs given the premium, deductible, coinsurance,
and total medical bills. We will be working with two pre-defined health care plans, as well as letting the user enter their
own parameters. Here are the two plans:
Analysis
As you gain experience with programming, you will be able to analyze the description above and create a program to
compute the health care costs. In this first project, however, we will guide you through the analysis part and help you
design your program.
One of the first steps in analysis is determining the inputs that your program needs and the outputs it will produce. Before
reading the next part of the description, take a minute to write down the inputs and outputs.
You should have written down the following:
Inputs: Premium, deductible, coinsurance, amount of medical bills
Output: health care costs
Design
As with the analysis, as you gain experience with programming you will reach the point where you can complete the design
on your own. This is where you figure out the algorithm (i.e., the steps the computer needs to take) for computing the
health care costs for a given premium, deductible, coinsurance, and amount of medical bills. You can use the definitions
and examples above to figure this out, along with the requirements that follow.
Your program should meet the following specifications. (The amount of points for each part is in square brackets).
[10 pts] As with all your code, correct compilation is critical.
Commenting and style
o [3 pts] Comments should be clearly written with correct grammar and spelling.
o [3 pts] Indentation and general appearance should

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

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

978-0764535376

More Books

Students also viewed these Databases questions

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago