IPO Lap Problem 1 • Create a flow chart and IPO for the following application: – A user is allowed to enter 5 numbers. The application should provide summary data for the number set including the average, min value and max value. 1 IPO 1 Solution - Good Start Read in # s Find Avg, Smallest and Largest Output # s End 2 IPO 1 Solution - Better Start Read in # s Sum 5 # s Divide Sum by 5 to find average Sort # s smallest to largest Select 1st # as min Select last # as max Output results End 3 IPO 1 Solution Input Processing Output Num 1 Num 2 Num 3 Num 4 Num 5 Processing Items - Sum Average Min Value Max Value Algorithm: 1. Enter num 1 through num 5 2. Sum the 5 numbers 3. Calculate average by dividing the sum by five 4. Sort the numbers smallest to largest 5. Determine the min value by picking the first number in the list 6. Determine the max value by picking the last number in the list 7. Output Avg, Min Value and Max Value 4 IPO Lap Problem 2 • Create a flow chart and IPO for the following business application: – A local car dealership has contracted with you to develop a system to approve or reject credit applications. – From the credit application file you have access to the applicants name, birthdate and annual income. – There is a pre built module called “getcreditscore” your application can invoke to return the applicants credit score. – To approve the application the applicant must be 21 and have an annual income greater than $50,000 or have a credit score above 750. To be approved the credit score 5 must always be above 600. IPO 2 Solution - Good Start Read in birthdate & annual income Run getcreditscor e Default status to accepted Determine age Set status to rejected if age is under 21 Set status to rejected if credit score is under 600 Set status to rejected if annual income < $50k and credit score below 750 Output status End 6 IPO 2 Solution Input Processing Output Annual Income Birthdate Cred Score Processing Items - None Status Algorithm: 1. Read in Birthdate and Annual Income 2. Obtain Credit Score 3. Calculate Age 4. Set Status to rejected if age < 21 5. Set Status to rejected if credit score < 600 6. Set Status to rejected if annual income < $50k and credit score < 750 7. Output Status 7 IPO 2 Solution - Better Start Read in birthdate & annual income Default status to accepted Determine age Age < 21 T Set Status to rejected Output Status F T T Run getcreditscor e Credit Score < 600 F End F Annual Income < $50K and CS < 750 8 IPO Lap Problem 3 • Create a flow chart and IPO for the following business application: – The local car dealership loved the work you did in the credit application system and would like to hire you help with a module in their payroll system to calculate annual bonuses for their sales team. – There are 25 associates on their sales team. Their total pay is made up of their base salary and commission pay. 9 IPO Lap Problem 3 (cont.) • Create a flow chart and IPO for the following business application: – Each associate is evaluated annually and given a performance rating of either A (consistently exceeding expectations), B (often exceeding expectations), C (meeting expectations) or D (did not meet expectations) – To be eligible for the bonus the associate must receive at least a C rating. – Associates with an A rating receive a 15% bonus – Associates with a B rating receive a 10% bonus – Associates with a C rating receive a 5% bonus 10 IPO 3 Solution Input Processing Output Base Pay Commission Pay Performance Rating Processing Items - Total Pay - Bonus Rate Bonus Pay Algorithm: 1. Read in Base Pay, Commission Pay and Performance Rating 2. Sum Base Pay and Commission Pay to find Total Pay 3. Default Bonus Rate to 0 3. If Performance Rating is A then set Bonus Rate to .15 4. If Performance Rating is B then set Bonus Rate to .10 5. If Performance Rating is C then set Bonus Rate to .05 6. Set Bonus Pay to Total Pay * Bonus Rate 7. Output Bonus Pay 8. If not 25th employee start back at step 1 11 IPO 3 Solution Start Read in Base Pay and Commission Pay Sum Base Pay and Commission Pay F Default Bonus Rate to 0 Performance Rating A Set Bonus Rate to .15 B C Set Bonus Rate to .10 Set Bonus Rate to .05 Set Bonus Pay to Total Pay * Bonus Rate Display Bonus Pay Is 25th Employee T End 12
© Copyright 2026 Paperzz