Answered step by step
Verified Expert Solution
Link Copied!

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 findMaxValue(List list)
// Effects: if list is null throw NullPointerException
// else return the maximum value in the list; if list is empty, return Integer.MIN_VALUE
Base your answer on the following characteristics and partitioning:
Characteristic C1: Location of the maximum value in the list
Block-1: The maximum value is the first entry in the list.
Block-2: The maximum value is the last entry in the list.
Block-3: 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 partitions/blocks, 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago