Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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