Resolving two meanings of points

A Java game uses the following class to preview a player's score. Inside main, Score score = new Score(); has executed. What does score.projected(3) return? Give your answer in points, to the nearest whole point.


Java
class Score {
    int points = 17;

    int projected(int points) {
        return this.points + 2 * points;
    }
}

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Class Attributes and Methods Questions: