The Dash Cell Phone Company charges customers a basic rate of $5 per month to se
ID: 3567117 • Letter: T
Question
The Dash Cell Phone Company charges customers a basic rate of $5 per month to
send text messages. Additional rates are as follows:
l The first 60 messages per month, regardless of message length, are included in
the basic bill.
l An additional five cents is charged for each text message after the 60th
message, up to 180 messages.
l An additional 10 cents is charged for each text message after the 180th message.
l Federal, state, and local taxes add a total of 12 percent to each bill.
Design a flowchart or pseudocode for the following:
a. A program that accepts the following data about one customers bill: customer
area code (three digits), customer 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 $20.
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
Explanation / Answer
* Read Customer_area with robust input for a positive integer with three digits
* Read Customer_phone with robust input a positive integer with seven digits
* Read Customer_text with robust input for positive integers
* print "Basic rate for subscription: $5 per month", set Customer_bill to 5
* select case of
: Customer_text <= 60 print "No extra charge for text messages"
: Customer_text <= 180 print "(Customer_text - 60) * 0.05 extra for text messages", add (Customer_text - 60) * 0.05 to Customer_bill
: Customer_text > 180 print "$6 extra for text messages from 60 - 180, (Customer_text - 180) * 0.10 extra for text messages beyond 180", add (Customer_text - 180) * 0.10 to Customer_bill, add 6 to Customer bill
* print "Bill before taxes is Customer_bill"
* Customer_finalbill = Customer_bill * 1.12
* print "Bill after 12% federal, state and local tax is Customer_finalbill"
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.