Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Use Java Selection Control Flow Statements Cellphonehub Cellphone Plan Comparison Service Q35621434

Use java- selection and control flowstatements

CellphoneHub is cellphone plan comparison service that helpsuser choose an appropriate phone plan in Canada. They currentlyprovide details for three different plans and support 3 differentcell phone models. The details are mentioned below.
Three cellphone models available are Google Pixel 3, Samsung Note 9and iPhone X Max.
There are three family cell phone plans available (all of them are2 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 youwill get $10 discount for each added line. You also get $10discount if you bring your own phone (BYOP). The details for cellphone discounts with each plan and along with plan price tags aretabulated below.

                                                                                                    PLANS and Phone Prices

Phones                        Phone OutrightPrice              PLAN A ($70)        PLAN B($89)      PLAN C ($120)

BYOP (NoPhone)                  N/A                             $10 discount         $10 discount       $10 discount

Google Pixel3                   $1269.00                         $779.00                $429.00              $0.00

Samsung Note9                $1599.00                         $1189.00              $839.00              $639.00

iPhone XMax                    $1809.99                         $1339.00              $939.00              $819.99

Write a java program that helps a user decide which planworks better for him. The program should ask the user to enter thetotal number of phone lines and whether or not a phone needs to bepurchased with each line. Compare all three plan costs and providethe user with all his options.
*You can leave more than 2 decimal places for the prices and you donot need to compute taxes. You may assume a perfect user andtherefore there is no need for any input validation; however, they/n choices should be case in-sensitive.

Here are a few sample outputs to illustrate the expectedbehavior of your program. Note: user input inbold.

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 enter1 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

Leave a Reply

Your email address will not be published. Required fields are marked *