Question: Question 1 . ( 6 0 pts . ) Consider specifications A , B , and C below. Assume arg and result are integers and
Question pts Consider specifications A B and C below. Assume arg and result are integers and arr is an array of
integers. Select all statements which are true:
Spec A: Spec B: Spec C:
requires: arr null and arg requires: arr null and arg requires: None
and arg and arg
modifies: None modifies: arr modifies: None
effects: None effects: sorts arr effects: None
throws: None throws: RuntimeException, throws: IllegalArgumentException,
if arg if arr null
returns: result returns: result if arg returns: result if arg ;and arg ; result if arg
result if arg
or arg
a A is stronger than B
b B is stronger than A
c Neither is A stronger than B nor is B stronger than A
d A is stronger than C
e C is stronger than A
f Neither is A stronger than C nor is C stronger than A
g B is stronger than C
h C is stronger than B
i Neither is B stronger than C nor is C stronger than B
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
