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

Public class Racecar { Private static final int MAXIMUM_SCORE = 999; Private Str

ID: 3583076 • Letter: P

Question

Public class Racecar {

Private static final int MAXIMUM_SCORE = 999;

Private String carname;

Private int trackpoints;

Private int stylepoints

Private int racepoints;

Private String carnumber;

Public Racecar (String name, String carnumber) {

This.name = carname;

This.carnumber = carnumber;

}

Public String getBestEvent() {

If (trackpoints < stylepoints) {

If (trackpoints < racepoints) {

return “Score”;

}

Return “Race Point”;

}

if (stylepoints < racepoints) {

Return “Style Points”;

}

Return “Score”

}

}

What are the names of the instance variables declared in this class?

What are the signatures of the constructors declared in this class?

What are the names of the parameters declared in this class?

What are the signatures of the methods declared in this class?

What are the names of the constants declared in this class?

Explanation / Answer

1. Names of instance variables - carname, trackpoints, stylepoints, racepoints, carnumber, MAXIMUM_SCORE

2. Signatures of constructors - Public Racecar (String name, String carnumber);

3. Names of the parameters - name, carnumber

4. Signature of methods - Public String getBestEvent(); , Public Racecar (String name, String carnumber);

5. Constants - MAXIMUM_SCORE

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote