Results 1 to 2 of 2
- 02-15-2010, 10:28 PM #1
Member
- Join Date
- Jan 2010
- Posts
- 36
- Rep Power
- 0
Semantic error: Message incrementMedalCount() not understood by class'OlympicFrog'
Hi All
I have error: Semantic error: Message incrementMedalCount() not understood by class'OlympicFrog'
Below is my code. What is wrong with incrementMedalCount() method??
Java Code:/** * Class OlympicFrog - Extends Frog Class with one additional instance variable: medalCount * (it holds the number of medals won by instance of OlympicFrog) * * @author Marcin Steciuk * @version 1.0 */ public class OlympicFrog extends Frog { /* instance variables */ private int medalCount; private static OlympicFrog currentLeader = null; //OlympicFrog that has the most medals /** * Constructor for objects of class OlympicFrog */ public OlympicFrog() { super(); this.medalCount = 0; } /* instance methods */ /** * Getter method for medalCount (returns value of medalCount) */ public int getMedalCount() { return this.medalCount; } /** * Getter method for currentLeader (returns value of currentLeader) */ public OlympicFrog getCurrentLeader() { return OlympicFrog.currentLeader; } /** * Setter method for currentLeader */ public void setCurrentLeader(OlympicFrog aValue) { OlympicFrog.currentLeader = aValue; } /** * Increments the position of the medalCount by 1. */ private void incrementMedalCount() { this.medalCount = this.medalCount + 1; } }
- 02-15-2010, 10:32 PM #2
Member
- Join Date
- Jan 2010
- Posts
- 36
- Rep Power
- 0
Similar Threads
-
Help with a error message desparate
By Chewart in forum New To JavaReplies: 34Last Post: 01-23-2010, 05:59 PM -
Error Message????
By Cubba27 in forum New To JavaReplies: 11Last Post: 11-21-2009, 02:46 PM -
TreeMap class and message not understood issues - help please
By trueblue in forum New To JavaReplies: 8Last Post: 07-22-2009, 01:16 AM -
Error Message in JBuilder
By RavenNevarmore in forum New To JavaReplies: 4Last Post: 10-08-2008, 06:53 AM -
error message on jsp
By sandor in forum Web FrameworksReplies: 1Last Post: 04-11-2007, 02:10 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks