Consider the following code snippet:
public class Score
{
private String name; . . .
public boolean equals(Object otherScore)
{
Score other = (Score) otherscore;
return name.equals(other.name);
} . . .
}
What is wrong with this code?
a) The return statement should use the == operator instead of the equals method.
b) The parameter in the equals method should be declared as Score otherScore.
c) It is an error to cast otherScore as a Score object before using the equals method
d) There is nothing wrong with this code.