Question: public static int findMaxValue ( List list ) / / Effects: if list is null throw NullPointerException / / else return the maximum value in
public static int findMaxValueList list
Effects: if list is null throw NullPointerException
else return the maximum value in the list; if list is empty, return Integer.MINVALUE
Base your answer on the following characteristics and partitioning:
Characteristic C: Location of the maximum value in the list
Block: The maximum value is the first entry in the list.
Block: The maximum value is the last entry in the list.
Block: The maximum value is in some position other than the first or last.
a "Location of the maximum value in the list" fails the disjointness property. Give an example that illustrates this.
b "Location of the maximum value in the list" fails the completeness property. Give an example that illustrates this.
c Revise the characteristic above to capture the intent of "Location of the maximum value in the list" but does not suffer from completeness or disjointness problems.
d Add any additional relevant characteristics and their partitionsblocks as deemed appropriate.
Hint: Think about the possible values that the list parameter can take in this function
based on the characteristics you identified in question c and d collectively, write a set of test cases that satisfies Base Choice Coverage BCC Please clearly indicate your base choice.
i Derive your test cases with the values.
ii Write your test cases with the values.
iii. Be sure to include inputs test input values and expected outputs.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
