Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Question 1 . ( 6 0 pts . ) Consider specifications A , B , and C below. Assume arg and result are integers and

Question 1.(60 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 >0 requires: arr = null and arg >=0 requires: None
and arg <10 and arg <=20
modifies: None modifies: arr modifies: None
effects: None effects: sorts arr effects: None
throws: None throws: RuntimeException, throws: IllegalArgumentException,
if arg >10 if arr = null
returns: 0<= result <=10 returns: 0<= result <=10, if arg >0 returns: 0<= result <=5, if arg <=20;and arg <10; result =0, if arg =0
result =5, if arg =0
or arg >=10
(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

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

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students explore these related Databases questions