Life Insurance Company

Assignment 4 on Chapter 4

1. Mortimer Life Insurance Company wants several lists of salesperson data. Design a flowchart and pseudocode for the following:

A program that accepts a 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 program that accepts salesperson data continuously until a sentinel value is entered.

start

 Declarations

  num salespersonID

  num policySold

  num POLICY_MINIMUM = 25

  num QUIT = -1

  string salesQuit = “Enter the sales person ID or -1 to quit ”

 housekeeping()

   while (salespersonID != QUIT )

 detailLoop()

   endwhile

 endofjob()

stop

housekeeping()

  output "Enter the sales person ID"

  input salespersonID

return

detailLoop()

  output “Enter number of policies sold  ”

  input policySold

  if (policySold > POLICY_MINIMUM)

    output salespersonID, policySold

  endif

  output salesQuit

  input salespersonID

return

endofjob()

output “End of program”

return

2. Black Dot Printing is attempting to organize carpools to save energy. Each input record contains an employee’s name and town of residence. Ten percent of the company’s employees live in Wonder Lake; 30 percent live in the adjacent town of Woodstock. Black Dot wants to encourage employees who live in either town to drive to work together. Design a flowchart and pseudocode for following:

A program that continuously accepts an employee’s data until end of file is reached, and displays it with a message that indicates whether the employee is a candidate for the carpool.

start

 Declarations

  string employeeName

  string employeeTown

  string ELIGIBLE = "is a candidate for the carpool program"

  

 housekeeping()

   output “Car pool eligibility program”

 detailLoop()

 endofjob()

stop

housekeeping()

  output "Enter employee name"

  input employeeName

  output "Enter employee town"

  input employeeTown

return

detailLoop()

  if (employeeTown = woodstuck OR employeeTown = wonder lake)

     output "this person", employeeName,"","from","",employeeTown,"",ELIGIBLE

  else

    endofjob()

  endif

return

endofjob()

 output "end of program"

return

hihi


Want latest solution of this assignment

Want to order fresh copy of the Sample Template Answers? online or do you need the old solutions for Sample Template, contact our customer support or talk to us to get the answers of it.