Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DECISION TABLES Summary: you will be developing DT tests for the method Insurance.premium ( ) . General Instructions Source code for class Insurance is provided
DECISION TABLES
Summary: you will be developing DT tests for the method Insurance.premium
General Instructions
Source code for class Insurance is provided in the source folder.
Tasks:
Task : develop DT tests for Insurance.premium as specified at the end of this document and in the source code Document the results of your analysis, the test coverage items, and the test cases. Then develop your test implementation: you may use the testtemplate file as the basis for this.
DT Testing Notes
To simplify the lab, you will be developing tests for the following conditions only:
An insurable age ie age and age
ncbYES
In the real world, you would then go on and develop DT tests for the inverse of these conditions this technique called subtables will be discussed in the lecture next week.
Do NOT include ncb in your analysis or Test Coverage Items
Do NOT include values of age outside this range in your analysis or Test Coverage Items
DO include ncb in your Test Cases
As before, treat the output from premium like an enum according to the specification it can only take on one of discrete values, so you cannot write tests to generate any other value, so there is no need to consider all the other values not mentioned. Use five partitions, with one value each, in increasing numeric order.
Specification for premium
Description
The method Insurance.premium calculates the premium for car insurance based on several factors.
Javadoc
Note
The source code for premium is provided in the lab folder see Insurance.java
You can view the formatted Javadoc by using the command:
javadoc d javadoc Insurance.java
And then opening javadoccsInsurancehtml in the browser.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started