Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ans = 0, x = 15, y = 25 ans = 25, x = -10, y = 25 ans = 35, x = 15, y = 40 ans =

ID: 3567044 • Letter: A

Question

ans = 0, x = 15, y = 25

ans = 25, x = -10, y = 25

ans = 35, x = 15, y = 40

ans = 25, x = 15, y = 40

2.What would be the value of bonus after the following statements are executed?

3.

If str1 and str2 are both Strings, which of the following expressions will correctly determine whether they are equal?

(1) (str1 == str2)
(2) str1.equals(str2)
(3) (str1.compareTo(str2) == 0)

1, 2, and 3 will all work.

1 and 2

1 and 3

2 and 3

5.

200

500

750

1000

1250

ans = 0, x = 15, y = 25

ans = 25, x = -10, y = 25

ans = 35, x = 15, y = 40

ans = 25, x = 15, y = 40

2.What would be the value of bonus after the following statements are executed?

.

3.

If str1 and str2 are both Strings, which of the following expressions will correctly determine whether they are equal?

(1) (str1 == str2)
(2) str1.equals(str2)
(3) (str1.compareTo(str2) == 0)

1, 2, and 3 will all work.

1 and 2

1 and 3

2 and 3

4. What would be the value of discountRate after the following statements are executed?

5.

What will be the value of bonus after the following code is executed?

200

500

750

1000

1250

What will be the values of ans, x, and y after the following statements are executed? 200 500 750 1000 1250 5. What will be the value of bonus after the following code is executed? What will be the values of ans, x, and y after the following statements are executed? 200 500 750 1000 1250 5. What will be the value of bonus after the following code is executed? 3. If str1 and str2 are both Strings, which of the following expressions will correctly determine whether they are equal? (1) (str1 == str2) (2) str1.equals(str2) (3) (str1.compareTo(str2) == 0) 1, 2, and 3 will all work. 1 and 2 1 and 3 2 and 3 4. What would be the value of discountRate after the following statements are executed? ans = 0, x = 15, y = 25 ans = 25, x = -10, y = 25 ans = 35, x = 15, y = 40 ans = 25, x = 15, y = 40 2.What would be the value of bonus after the following statements are executed?

Explanation / Answer

ans = 35, x = 15, y = 40

500

1, 2, and 3 will all work.

750