Question: Question 2 ( 3 0 % ) Write your codes inside Q 2 function block that calculates the total charge under a mobile data plan
Question
Write your codes inside Q function block that calculates the total charge under a mobile data plan Plan B according to the table below.
The program should accept the following user inputs in order. Note that prompt messages are needed.
Local data usage in GBa double value
Roaming data usage in GBa double value
Local call time in minutesan integer value
Roaming call time in minutesan integer value
After receiving the above inputs, the program shows the total charge calculated in two decimal places.
In the calculation, if the total data usage local roaming exceeds there is a discount on the total data cost. If the local call time exceeds minutes, there is a discount on the total call cost.
tableItemsCharge for Plan B per GB or per minLocal Data up to GB$Local Data GB to GB $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
