t all is $0.00) d. A program that continuously accepts e. A program that prompts
ID: 3750926 • Letter: T
Question
t all is $0.00) d. A program that continuously accepts e. A program that prompts the user for a maximum required bid, and ald h the length is between 7 and 30 days inclusive thn continuously accepts auction data and displays data for every aucti the minimum bid is less than or equal to the amount entered by the n The Dash Cell Phone Company charges customers a basic rate of $5 Der The first 60 messages per month, regardless of message length, are the basic bill. send text messages. Additional rates are as follows: included . . An additional five cents is charged for each text message after the 60th e An additional 10 cents is charged for each text message after the 180th Design a flowchart or pseudocode for the following: up to 180 messages. Federal, state, and local taxes add a total of 12 percent to each bill. a. A program that accepts the following data about one customer's messages: area code b. A program that continuously accepts data about text ssages until a sentinel c. A program that continuously accepts data about text messages until a sentine d. A program that continuously accepts data about text messages until a sentin e. A program that prompts the user for a three-digit area code from which to seled (three digits), phone number (seven digits), and number of text messages sent. Displ all the data, including the month-end bill both before and after taxes are added. value is entered, and displays all the details. value is entered, and displays details only about customers who send more that 100 text messages. value is entered, and displays details only about customers whose total bill wi taxes is over $20. bill. Then the program continuously and displays data only for messages sent from the specified area c accepts text message data until a sentinel vaExplanation / Answer
Answer:
a)
Pseudo Code:
Declare of necessary variables which are in use of this program
Call the methods acceptData ( ), calculateBill ( ), Display ( ) to get input for the Dash cell phone company
Start
Declarations
Num basic_rate = 5
Num area_code
Num cust_phone_num
Num msg_sent
Num rate = 0.12
Num total
Num month_bill
Num remain_msg
acceptData ( )
calculateBill ( )
Display ( )
Stop
Definition of method acceptData ( ):
Details such as area_code, cust_phone_num, msg_sent variables are taken as inputs from the user
acceptData ( )
output "Enter customer area code (only 3 digits) "
input area_code
output "Enter customer phone number (only 7 digits) "
input cust_phone_num
output "Enter number of messages sent in a month"
input msg_sent
return
Definition of method calculateBill ( ):
check whether the sent messages are less than 60 and then bill with and without taxes are calculated.
check whether the sent messages are in between 60 and 180 and then bill with and without taxes are calculated.
check whether the sent messages are more than 180 and then bill with and without taxes are calculated.
calculateBill ( )
if msg_sent < 60 then
total = basic_rate
month_bill = total + (total * rate)
else
if msg_sent > = 60 AND msg_sent < 180 then
remain_msg = msg_sent - 59
total = basic_rate + (remain_msg * 0.05)
month_bill = total + (total * rate)
else
if msg_sent > = 180 then
remain_msg = msg_sent – 179
total = basic_rate + (remain_msg * 0.10 )
month_bill = total + (total * rate)
endif
return
Definition of Method Display ( ):
In Here, the variables area_code, cust_phone_num, msg_sent, total and month_bill are outputed on to the screen
Display ( )
Output "customers phone number is", area_code, cust_phone_num
Output "number of messages sent in a month are”, msg_sent
Output "total amount excluding taxes is $", total
Output "bill amount including taxes is $", month_bill
Return
b)
Pseudo Code:
Declare necessary variables which are in use of this program.
Call method acceptData( ) to get input for the dash cell cust_phone_num company.
Check whether the area is not equal to 0 or not if area is zero the while loop does not execute.
Call method calculateBill ( ), Display ( ) calculateBill ( )
Start
Declarations
Num basic_rate = 5
Num area_code
Num cust_phone_num
Num msg_sent
Num rate = 0.12
Num total
Num month_bill
Num remain_msg
Num Quit = 000
acceptData ( )
while area_code <> Quit
Display ( )
End while
Stop
Definition of the Method acceptData ( )
First the area code is entered to check whether to continue or not.
Check whether the variable area is 0.
If it is zero the user want to quit.
only if area_code is not 0 the statements are executed.
acceptData ( )
output "Enter customer area code (only 3 digits) or enter", Quit, "to quit"
input area
if area_code <> Quit then
output "Enter customer phone number (only 7 digits) "
input cust_phone_num
output "Enter number of messages sent in a month"
input msg_sent
endif
return
Definition of the Method calculateBid ( ):
Check whether the sent messages are less than 60 and then bill with and without taxes are calculated.
Check whether the sent messages are in between 60 and 180 and then bill with and without taxes are calculated.
Check whether the sent messages are more than 180 and then bill with and without taxes are calculated.
calculateBill ( )
if msg_sent < 60
total = basic_rate
month_bill = total + (total * rate)
else
if msg_sent > = 60 AND msg_sent < 180
remain_msg = msg_sent - 59
total = basic_rate + (remain_msg * 0.05)
month_bill = total + (total * rate)
else
if msg_sent > = 180
remain_msg = msg_sent – 179
total = basic_rate + (remain_msg * 0.10 )
month_bill = total + (total * rate)
endif
return
Definition of Method Display ( ):
In Here, the variables area_code, cust_phone_num, msg_sent, total and month_bill are outputed on to the screen
Display ( )
Output "customers phone number is", area_code, cust_phone_num
Output "number of messages sent in a month are", msg_sent
Output "total amount excluding taxes is $", total
Output "bill amount including taxes is $", month_bill
Return
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.