[SOLVED] COMP5710 Homework 5

25.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Problem Descriptions:
Suppose we are to test an car insurance calculation system. An input to the system (X, Y) contains a boolean value X and a nonnegative integer Y. If X = 0, it means the insurer is currently younger than or at 24 years old, and 1 if older. Any other value of X is invalid input. Y represents the net value of the vehicle insured. Round the output to 2 decimal places.
Design test cases to cover all boundaries for this system. Some invalid test cases must also be designed. Note: a test case should contain both input and expected output, i.e., ((X, Y), fee). You should test the cases beyond, on, and below the boundary.

A hypothetical insurance company’s fee brackets are shown below, and the fee is just the product of car value and rate. Any car value lower than $1000 is not insurable anymore:

Age 25- Brackets
Car Value Rate
≥$1,000.00 3%
≥$5,000.00 4%
≥$20,000.00 5%

Age 25+ Brackets
Tax Bracket Rate
≥$1,000.00 2%
≥$5,000.00 3%
≥$20,000.00 4%

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.