Module 3 Com 204.docx - Module 3 COM 204 2 Design a flowchart or pseudocode for a program that accepts two numbers from a user and displays one of the

Module 3 Com 204.docx - Module 3 COM 204 2 Design a...

This preview shows page 1 - 4 out of 21 pages.

Module 3 COM 204 January 27, 2018 2.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
Image of page 1
Input salesperson’s ID number of policies If number of policies > 25 Output salesperson’s ID, number of policies end if Stop 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.
Image of page 2
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. Start Declarations Num basic = 5 Num area Num phone Num sent Num rate = 0.12 Num total Num bill Num remi Calling Methods acceptData(), calculateBill (), Display () to get input for the Dash cell phone company acceptData () 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 phone output “Enter number of messages sent in a month”
Image of page 3
Image of page 4

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture