Question: Please answer the question (a)~(b) completely Much obliged! Consider the following code specification: def union(seti, set2): set1 and set2 are collections of objects, each of

Please answer the question (a)~(b) completely Much obliged! Consider the following codespecification: def union(seti, set2): set1 and set2 are collections of objects, eachPlease answer the question (a)~(b) completely

Much obliged!

Consider the following code specification: def union(seti, set2): set1 and set2 are collections of objects, each of which might be empty. Each set has no duplicates within itself, but there may be objects that are in both sets. Objects are assumed to be of the same type. This function returns one set containing all elements from both input sets, but with no duplicates. Indicate which of the conditions below would combine to make a good black box test suite for the function union. Select one or more: O A. set1 is an empty set; set2 is an empty set B. set1 is an empty set; set2 is of size greater than or equal to 1 C. set1 is of size greater than or equal to 1; set2 is an empty set D. set1 and set2 are both nonempty sets which do not contain any objects in common E. set1 and set2 are both nonempty sets which contain objects in common Check Consider the following function definition: def union(set1, set2): 11 set1 and set2 are collections of objects, each of which might be empty. Each set has no duplicates within itself, but there may be objects that are in both sets. Objects are assumed to be of the same type. This function returns one set containing all elements from both input sets, but with no duplicates. if len(set1) == 0: return set2 elif set1[O] in set2: return union(set1[1:], set2) else: return set1[0] + union(set1[1:], set2) Assume that union is called with strings as arguments. Please select the best glass box test suite for the function union from the following options: Select one or more: A. Test Suite A: union("."), union(",'a'), union(",'ab'), union('a','), union('a','b'), union('c', 'ab'), union('de','), union('ab"c'), union('cd', 'ab') B.Test Suite B: union('abc','), union('abc', 'a'), union('abc', 'ab'), union('abc','d'), union('abc', 'abcd') C. Test Suite C: union(','abc'), union('a','abc'), union('ab','abc'), union('abc','abc') D. Test Suite D: union(",'abc'), union('a','abc'), union('ab','abc'), union('d','abc') 0 0 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!