expand icon
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

Edition 7ISBN: 1285225562
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

Edition 7ISBN: 1285225562
Exercise 7

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 60 messages per month, regardless of message length, are included in the basic bill.

• An additional five cents is charged for each text message after the 60th message, up to 180 messages.

• An additional 10 cents is charged for each text message after the 180th message.

• 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 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 $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.

Step-by-step solution
Verified
like image
like image

Step 1 of 20

a.

Flowchart:

The flowchart accepts the customer data and displays the customer phone number, area code, number of messages sent, monthly bill including and excluding taxes. The flowchart calls the subroutines acceptData(), calculateBill(), Display().

    <div class=answer> a. Flowchart: The flowchart accepts the customer data and displays the customer phone number, area code, number of messages sent, monthly bill including and excluding taxes. The flowchart calls the subroutines acceptData(), calculateBill(), Display().   Flowchart to display the customer phone number, area code, number of messages sent, monthly bill including and excluding taxes. It represents subroutine Display().

Flowchart to display the customer phone number, area code, number of messages sent, monthly bill including and excluding taxes. It represents subroutine Display().

    <div class=answer> a. Flowchart: The flowchart accepts the customer data and displays the customer phone number, area code, number of messages sent, monthly bill including and excluding taxes. The flowchart calls the subroutines acceptData(), calculateBill(), Display().   Flowchart to display the customer phone number, area code, number of messages sent, monthly bill including and excluding taxes. It represents subroutine Display().


Step 2 of 20


Step 3 of 20


Step 4 of 20


Step 5 of 20


Step 6 of 20


Step 7 of 20


Step 8 of 20


Step 9 of 20


Step 10 of 20


Step 11 of 20


Step 12 of 20


Step 13 of 20


Step 14 of 20


Step 15 of 20


Step 16 of 20


Step 17 of 20


Step 18 of 20


Step 19 of 20


Step 20 of 20

close menu
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
cross icon