Consider the pseudo-code below for computing insurance premium.(i) Draw the program graph(ii) Comput
Consider the pseudo-code below for computing insurance premium.(i) Draw the program graph(ii) Compute the cyclomatic complexity(iii) Derive a set of basis paths that can be used to test the program(iv) Given that the baseRate is $500.00, create the test cases that will exercise all the branches for switch case C4 only. The test cases should show the inputs, the path taken and the expected output. [Hint: There should be only two test cases.]1 program compute_insurance_premium()2 integer driverAge, points3 real baseRate, premium4 Input(baseRate, driverAge, points)5 safeDriveFactor = 0.06 premium = 0.07 switch (driverAge) {8 case C1: 16 <= driverAge < 259 ageFactor = 3.010 if points < 2 then11 safeDriverFactor = 4012 end if13 break; // End Case C114 case C2: 25 <= driverAge < 4515 ageFactor = 2.216 if points < 3 then17 safeDriverFactor = 4018 end if19 break; // End Case C220 case C3: 45 <= driverAge < 6521 ageFactor = 1.522 if points < 5 then23 safeDriverFactor = 8024 end if25 break; // End Case C326 case C4: 65 <= driverAge < 10027 ageFactor = 2.028 if points < 2 then29 safeDriverFactor = 12030 end if31 break; // End Case C432 default:33 Output("Driver age out of range.")34 } //End switch35 premium = baseRate * ageFactor - safeDriverFactor36 Output(premium)
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.