asiavoices
Programmer
Hello all,
I have a really peculiar problem today in that when I created 4 instances from an abstract class with one abstract method in it, it was working great yesterday....
Now when I revisited it and compiled it again, it gave me the infamous "cannot resolve symbol." message. :-(
I'm basically just creating 4 subclasses (Clubs, Diamonds, Hearts & Spades) from a Card superclass.
The error I'm getting is:
======================================
X:\jdk1.3.1_01\bin>javac Clubs.java
Clubs.java:50: cannot resolve symbol
symbol : class Card
location: class Clubs
public class Clubs extends Card
^
Clubs.java:67: cannot resolve symbol
symbol : variable suitValue
location: class Clubs
return suitValue = "CLUB";
^
2 errors
======================================
Here's my Superclass...
/* -----------------------------------
- Card abstract class -
-----------------------------------*/
public abstract class Card
{
protected int mface;
protected String suitValue;
/** Creates new Card */
public Card()
{
mface = 1;
suitValue = "";
}
public void setFace (int theFace)
{
mface = theFace;
}
public int getFace ()
{
return mface;
}
public abstract String getSuit();
} // end of abstract Card class
/* ---------------------------------------
- One of my subclasses (Clubs) -
---------------------------------------*/
public class Clubs extends Card
{
/* ---- default constructor ----- */
public Clubs()
{
super();
}
/* ---- getSuit returned method ------*/
public String getSuit()
{
return suitValue = "CLUB";
}
} // end of Clubs Class scope
As far as I know, I haven't really changed anything to the best of my knowledge.
Any ideas as to what might be causing this to happen?
Thanks,
Christopher
I have a really peculiar problem today in that when I created 4 instances from an abstract class with one abstract method in it, it was working great yesterday....
Now when I revisited it and compiled it again, it gave me the infamous "cannot resolve symbol." message. :-(
I'm basically just creating 4 subclasses (Clubs, Diamonds, Hearts & Spades) from a Card superclass.
The error I'm getting is:
======================================
X:\jdk1.3.1_01\bin>javac Clubs.java
Clubs.java:50: cannot resolve symbol
symbol : class Card
location: class Clubs
public class Clubs extends Card
^
Clubs.java:67: cannot resolve symbol
symbol : variable suitValue
location: class Clubs
return suitValue = "CLUB";
^
2 errors
======================================
Here's my Superclass...
/* -----------------------------------
- Card abstract class -
-----------------------------------*/
public abstract class Card
{
protected int mface;
protected String suitValue;
/** Creates new Card */
public Card()
{
mface = 1;
suitValue = "";
}
public void setFace (int theFace)
{
mface = theFace;
}
public int getFace ()
{
return mface;
}
public abstract String getSuit();
} // end of abstract Card class
/* ---------------------------------------
- One of my subclasses (Clubs) -
---------------------------------------*/
public class Clubs extends Card
{
/* ---- default constructor ----- */
public Clubs()
{
super();
}
/* ---- getSuit returned method ------*/
public String getSuit()
{
return suitValue = "CLUB";
}
} // end of Clubs Class scope
As far as I know, I haven't really changed anything to the best of my knowledge.
Any ideas as to what might be causing this to happen?
Thanks,
Christopher