Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 1 ) Switch To Light Mode ( HAS TWO parts / methods ) Question 1 ( 7 5 points ) Decision or Selection Structures

(1) Switch To Light Mode
(HAS TWO parts/methods)
Question 1(75 points )
Decision or Selection Structures and Loops
(Decision Tree: If - else if - else loop) The charges for Wireless
for one of the mobile companies is given in the following table.
Use if else if else decision structure.
Write a JAVA method to calculate the annual charges fine
calcAnnChargeFirstname called from main.
The variables in the program should be named as shown below
and should be input by the user:
expectedDataUsage firstname_//(Expected data usage per user
in the household - int data type)
numUsers firstname //(Number of users in the household - int
Data type)
tax_pct_firstname //( A double data type) This is the tax
percentage on the invoice. Tax is applied on the overall
calculated charges.
The program also should display the following message for each
of the above cases as shown in the table below:
Allowed Data Per User
Less than 15GB
Less than 25GB
Less than 50GB
Your method should calculate the Annual total charges per
household including the taxes and also should do the display.
Charges should be calculated using an if - else if - else
decision structure and make it more efficient by not repeating
code as much as possible.
The Message from the above table should be displayed using a
Switch - Case decision structure.
(Following are examples which you can use for testing. Please
Your method should calculate the Annual total charges per household including the taxes and also should do the display.
Charges should be calculated using an if-else if - else
Switch - Case decision structure.
(Following are examples which you can use for testing. Please
image text in transcribed

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

More Books

Students also viewed these Databases questions

Question

Additional Factors Affecting Group Communication?

Answered: 1 week ago