Fifteen minutes can save you 15% or more
Slides 4-9 in the deck for today (Complex conditions) walks through analyzing a car insurace premium estimation problem. Your job here is to write an interactive program that solves that problem, using two different approaches.
Your program should:
Gender | Age | Annual Premium |
---|---|---|
Male | Under 21 | 1500 + 200 for every outstanding ticket |
Male | 21 to 29 | 1200 + 100 for every outstanding ticket |
Male | 30 and older | 1000 + 100 for every outstanding ticket |
Female | Under 21 | 1200 + 200 for every outstanding ticket |
Female | 21 and older | 1000 + 100 for every outstanding ticket |
Write the program using an if-else tree with five branches and complex conditions.
Write the program using nested if-else trees as suggested in the slides as "Alternate Design".
Attach both working programs to the lab to submit.