Question
Use java- selection and control flow statements CellphoneHub is cellphone plan comparison service that helps user choose an appropriate phone plan in Canada. They currently
Use java- selection and control flow statements
CellphoneHub is cellphone plan comparison service that helps user choose an appropriate phone plan in Canada. They currently provide details for three different plans and support 3 different cell phone models. The details are mentioned below. Three cellphone models available are Google Pixel 3, Samsung Note 9 and iPhone X Max. There are three family cell phone plans available (all of them are 2 year plans): (1) Plan A (Canada wide calling with 4GB shared data) (2) Plan B (Canada wide calling with 10GB shared data) (3) Plan C (Canada wide calling with 12GB shared data) You can add as many lines to the shared plan as you want and you will get $10 discount for each added line. You also get $10 discount if you bring your own phone (BYOP). The details for cell phone discounts with each plan and along with plan price tags are tabulated below.
PLANS and Phone Prices
Phones Phone Outright Price PLAN A ($70) PLAN B ($89) PLAN C ($120)
BYOP (No Phone) N/A $10 discount $10 discount $10 discount
Google Pixel 3 $1269.00 $779.00 $429.00 $0.00
Samsung Note 9 $1599.00 $1189.00 $839.00 $639.00
iPhone X Max $1809.99 $1339.00 $939.00 $819.99
Write a java program that helps a user decide which plan works better for him. The program should ask the user to enter the total number of phone lines and whether or not a phone needs to be purchased with each line. Compare all three plan costs and provide the user with all his options. *You can leave more than 2 decimal places for the prices and you do not need to compute taxes. You may assume a perfect user and therefore there is no need for any input validation; however, the y/n choices should be case in-sensitive.
Here are a few sample outputs to illustrate the expected behavior of your program. Note: user input in bold.
CellPhoneHub Plans --------------------------------------------------------- Please enter the number of phone lines you need (1-5): 3 Line 1 Info:
Do you need a phone with this line (y/n): n
Line 2 Info:
Do you need a phone with this line (y/n): y
Do you want to purchase the phone outright (y/n): y
Please enter 1 for Google, 2 for Samsung or 3 for iPhone: 3
Line 3 Info:
Do you need a phone with this line (y/n): y
Do you want to purchase the phone outright (y/n): n
Please enter 1 for Google, 2 for Samsung or 3 for iPhone: 2 Plans Summary --------------- Total cost for 2 years with plan A will be $7318.99 Total cost for 2 years with plan B will be $8336.99 Total cost for 2 years with plan C will be $10368.99
CellPhoneHub Plans --------------------------------------------------------- Please enter the number of phone lines you need (1-5): 5 Line 1 Info:
Do you need a phone with this line (y/n): y
Do you want to purchase the phone outright (y/n): y
Please enter 1 for Google, 2 for Samsung or 3 for iPhone: 3
Line 2 Info:
Do you need a phone with this line (y/n): y
Do you want to purchase the phone outright (y/n): n
Please enter 1 for Google, 2 for Samsung or 3 for iPhone: 2
Line 3 Info:
Do you need a phone with this line (y/n): n
Line 4 Info:
Do you need a phone with this line (y/n): y
Do you want to purchase the phone outright (y/n): y
Please enter 1 for Google, 2 for Samsung or 3 for iPhone: 1
Line 5 Info:
Do you need a phone with this line (y/n): y
Do you want to purchase the phone outright (y/n): n Please enter 1 for Google, 2 for Samsung or 3 for iPhone: 3 Plans Summary --------------- Total cost for 2 years with plan A will be $12806.99 Total cost for 2 years with plan B will be $14336.99 Total cost for 2 years with plan C will be $17737.98
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started