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

an equals method is supposed to provide an equivalence relation among the object

ID: 3694470 • Letter: A

Question

an equals method is supposed to provide an equivalence relation among the objects of a class. this means that if a, b, and c are non-null objects of the class then

i. a equals(s) is true

ii. a. equals(b) has the same value as b. equals (a)

iii. if a. equals (b) is true and b. equals (c) is true, then a. equals (c) is true

State whether the following definitions of equals are valid. If they are not explain why.

A.) Two circles are equal if they have the same area

B.) Two circles are equal if their radii are within 10% of each outher.

C.) Two integers are equal if they have the same remainder when divided by a specific integer- for example, when divided by 3.

D.) Two integers are equal if the second integer is a multiple of the first.

Explanation / Answer

i. False
ii. True
iii. True

A) True
B) False
C) Fasle Ex. 13 not equal 16
D) Fasle Ex. 2 and 4 are not equal