Question

In: Computer Science

The Dash Cell Phone Company charges customers a basic rate of $5 per month to send...

The Dash Cell Phone Company charges customers a basic rate of $5 per month to send text messages. Additional rates are as follows:

  • The first 100 messages per month, regardless of message length, are included in the basic bill.
  • An additional three cents are charged for each text message after the 100th message, up to and including 300 messages.
  • An additional two cents are charged for each text message after the 300th message.
  • Federal, state, and local taxes add a total of 14 percent to each bill.

Design a flowchart or pseudocode for the following:

a. A program that accepts the following data about one customer's messages: area code (three digits), phone number (seven digits), and number of text messages sent. Display all the data, including the month-end bill both before and after taxes are added.

b. A program that continuously accepts data about text messages until a sentinel value is entered, and displays all the details.

c. A program that continuously accepts data about text messages until a sentinel value is entered, and displays details only about customers who send more than 100 text messages.

d. A program that continuously accepts data about text messages until a sentinel value is entered, and displays details only about customers whose total bill with taxes is over $10.

e. A program that prompts the user for a three-digit area code from which to select bills. Then the program continuously accepts text message data until a sentinel value is entered, and displays data only for messages sent from the specified area code.

Solutions

Expert Solution

Hey, here's the pseudo-code for question number "a".

a) Pseudocode:

Start
Declarations of variables
int val_basic = 5
int val_area
int val_phone
int val_sent
int val_rate = 0.12
int val_total
int val_bill
int val_remi
now call every method.
accept_Data ( )
calculate_Bill ( )
Display ( )
Stop
Now, we have to write the code for the above functions.
Accept_Data ( )
Get the input from the user.
print “Enter area code (only 3 digits)”
input val_area
print “Enter phone number (only 7 digits)”
input val_phone
print “Enter messages count sent in a month”
input val_sent
return

calculate_Bill ( )
//if condition 
if val_sent < 60 then
val_total = val_basic
val_bill = val_total + (val_total * val_rate)
else
if val_sent > = 60 AND val_sent < 180 then
val_remi = val_sent - 59
val_total = val_basic + (val_remi * 0.05)
val_bill = val_total + (val_total * val_rate)
else
if val_sent > = 180 then
val_remi = val_sent – 179
val_total = val_basic + (val_remi * 0.10 )
val_bill = val_total + (val_total * val_rate)
endif
endif
endif
return

Display ( )
print “val_phone number is”, val_area, val_phone
print “no. of messages sent are”, val_sent
print “total amount excluding taxes is $”, val_total
print “bill amount including taxes is $”, val_bill
Return

I hope you find it useful, if you have any query please comment down

Thanks,


Related Solutions

A cell phone company states that the mean cell phone bill of all their customers is...
A cell phone company states that the mean cell phone bill of all their customers is less than $83. A sample of 19 customers gives a sample mean bill of $82.17 and a sample standard deviation of $2.37. At ? = 0.05 , test the company’s claim? 1). State the hypothesis and label which represents the claim: : H 0 : H a 2). Specify the level of significance  = 3). Sketch the appropriate distribution, find and label the...
Westside Energy charges its electric customers a base rate of $4.00 per month, plus 12¢ per...
Westside Energy charges its electric customers a base rate of $4.00 per month, plus 12¢ per kilowatt-hour (kWh) for the first 300 kWh used and 3¢ per kWh for all usage over 300 kWh. Suppose a customer uses x kWh of electricity in one month. (a) Express the monthly cost E as a piecewise defined function of x. (Assume E is measured in dollars.) E(x) = A.  if 0 ≤ x ≤ 300 B.  if 300 < x C. (b) Graph the...
A friend or yours is considering two cell phone service providers. Provider A charges $100 per...
A friend of yours is considering two cell phone service providers. Provider A charges $100 per month for the service regardless of the number of phone calls made. Provider B does not have a fixed service ree but instead charges $1 per minute for calls. Your friend's monthly demand for minutes or calling is given by the equation p-120-30P, where P is the price of a minute.  With Provider A, the cost of an extra minute is 5 _______ .with...
Sprint charges its current customers an average of $55 per month. It costs Sprint $4.50 per...
Sprint charges its current customers an average of $55 per month. It costs Sprint $4.50 per month to serve these customers. It also spends $3 per customer per month to keep these customers loyal. Over the last few years Sprint has been able to retain 80% of its customers. Assume a discount rate of 5% annually. Calculate Sprint’s customer lifetime value of its current customers. [2] Sprint is willing to spend $320M in advertising to 10 million viewers, and $375M...
ANZflix, a media-services provider, charges subscribers $13.49 per month. To attract more customers, the Management and...
ANZflix, a media-services provider, charges subscribers $13.49 per month. To attract more customers, the Management and Product Planning team spents an estimated cost at $52,000 to produce and deploy products across all user interfaces. Also, the Software Engineering team maintains all systems and infrastructure to ensure that members can continue to sign up and watch ANZflix. This maintainance costs ANZflix $56,000 per month. ANZflix uses a server in Taiwan to deliver streaming videos to its subscribers and the facility runs...
1. how does your cell phone call or send a text message? ( i know it...
1. how does your cell phone call or send a text message? ( i know it related resonance photon frequency , and electromagnetic induction, but how to using it?) 2. how does message get recieved by the person you are hoping to call?
A phone company charges 0.25 AED per minutes for the first 100 minutes and 0.45 AED...
A phone company charges 0.25 AED per minutes for the first 100 minutes and 0.45 AED for each extra minutes. The company also rewards customers with points. If the bill is less than or equal to 20.00 AED, 10 points will be rewarded, otherwise, 1 point will be rewarded for each 2 AED. Write a Java Program to prompt the user to input the number of minutes he/she used, then output the bill amount and number of points rewarded. Note...
On its municipal website, the city of Tulsa states that the rate it charges per 5...
On its municipal website, the city of Tulsa states that the rate it charges per 5 CCF of residential water is $21.62. How do the residential water rates of other U.S. public utilities compare to Tulsa's rate? The data shown below ($) contains the rate per 5 CCF of residential water for 42 randomly selected U.S. cities. 10.68 9.38 12 6.7 12.62 14.73 15.76 10.32 14.7 16.38 17.8 19.38 18.18 13.05 17 17.55 15.84 15 19.11 18.19 15.1 18.62 16.25...
On its municipal website, the city of Tulsa states that the rate it charges per 5...
On its municipal website, the city of Tulsa states that the rate it charges per 5 CCF of residential water is $21.62. How do the residential water rates of other U.S. public utilities compare to Tulsa's rate? The data shown below ($) contains the rate per 5 CCF of residential water for 42 randomly selected U.S. cities. 10.58 9.28 11.9 6.6 12.52 14.63 15.66 10.22 14.6 16.28 17.7 19.28 18.08 12.95 16.9 17.45 15.74 14.9 19.01 18.09 15 18.52 16.15...
Ricky Ripov’s Pawn Shop charges an interest rate of 16.75 percent per month on loans to...
Ricky Ripov’s Pawn Shop charges an interest rate of 16.75 percent per month on loans to its customers. Like all lenders, Ricky must report an APR to consumers. a. What rate should the shop report? (Do not round intermediate calculations and enter your answer as a percent rounded to 2 decimal places, e.g., 32.16.) b. What is the effective annual rate? (Do not round intermediate calculations and enter your answer as a percent rounded to 2 decimal places, e.g., 32.16.)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT