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: Start Input 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 if end 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 value Input salesperson’s ID, number of policies if number of polices > 25 Output 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 i end while Stop 6. 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
Image of page 3
Image of page 4

You've reached the end of your free preview.

Want to read all 21 pages?

  • Fall '15
  • NUM

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors