100%(4)4 out of 4 people found this document helpful
This preview shows page 1 - 4 out of 21 pages.
Module 3 COM 204January 27, 20182.Design a flowchart or pseudocode for a program that accepts two numbers from a user and displays one of the following messages: First is larger, Second is larger, Numbers are equal.Pseudocode:The pseudocode for finding the largest number between two numbers:StartInput first, second If first is greater than second then Output “First is larger”else Output “Second is larger”If first=second then Output “Numbers are equal”end ifend if Stop 4. Mortimer Life Insurance Company wants several lists of salesperson data. Design a flowchart or pseudocode for the following:1.A program that accepts one salesperson’s ID number and number of policies sold in the last month, and displays the data only if the salesperson is a high performer—a person who sells more than 25 policies in the month.The following pseudocode displays the salesperson’s ID and number of polices of high performer:Start
Input salesperson’s ID number of policies If number of policies > 25Output salesperson’s ID, number of policies end ifStop 2.A program that accepts salesperson data continuously until a sentinel value is entered and displays a list of high performers.The following pseudocode displays the list of high performers until sentinel value is entered:Start Input value I while I != sentinel valueInput salesperson’s ID, number of policiesif number of polices > 25Output salesperson’s ID, number of policies end if Input value I end while Stop 3.A program that accepts salesperson data continuously until a sentinel value is entered and displays a list of salespeople who sold between 5 and 10 policies in the month.The following pseudocode displays the list of salespeople with the polices sold between 5 and 10 until a sentinel value is entered:Start Input value iend while Stop6. 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.StartDeclarations Num basic = 5Num area Num phoneNum sent Num rate = 0.12Num total Num billNum remiCalling Methods acceptData(), calculateBill (), Display () to get input for the Dash cell phone companyacceptData () calculateBill ( )Display ( )Stop Define of method acceptData ( )acceptData ()Details such as area phone, sent variables are taken as inputs from user output “Enter customer area code (only 3 digits)input phoneoutput “Enter number of messages sent in a month”