Steve
Project5.java:115: error: cannot find symbol
strClearedToGraduateMessage = clearedToGraduateMessage(student1,
^
symbol: method clearedToGraduateMessage(Advisee,Advisee,Advisee)
location: class Project5
1 error
Lilith Durham wrote:
Project5.java:115: error: cannot find symbol
strClearedToGraduateMessage = clearedToGraduateMessage(student1,
^
symbol: method clearedToGraduateMessage(Advisee,Advisee,Advisee)
location: class Project5
1 error
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Not when you have a 138‑line main method. I didn’t even bother reading that much code.Winston Gutkowski wrote: . . . Also (and I'm surprised that Campbell didn't spot this, because it's a pet peeve of his ), . . .
Campbell Ritchie wrote:Take the str bit off. That is called Hungarian Notation and is frowned upon. Similarly blnResult is a poor name for any boolean. Those equals and equivalent methods are a mass of poorly‑formatted code, which is really difficult to read. The mutliple else blocks in the equals method make me suspicious there is something else wrong with that method.
The commonest reason for a cannot find symbol error is that there is a tiny spelling error in an identifier. Otherwise it might not have been declared, or have gone out of scope before you try to use it.
Look at the link about Hungarian notation, and also read the Joel Spolsky link they provide; Spolsky taks about something slightly different, however.
Winston Gutkowski wrote:Your Project5 class doesn't have a method called clearedToGraduateMessage(). It's defined in Advisee. I suspect if you called
defaultAdvisee.clearedToGraduateMessage(...
the message would disappear; however, I've absolutely no idea whether that's what you want.
Winston Gutkowski wrote:Also (and I'm surprised that Campbell didn't spot this, because it's a pet peeve of his ), don't use '== true/false' when testing booleans; it's too easy to make a mistake, which is exactly what you've done on line 179 of your Advisee class; and the problem is that it may well compile but fail nastily at runtime, and the error may be difficult to work out.
Booleans should always be tested with:
if (booleanValue)
or
if (!booleanValue)
HIH
Winston
Campbell Ritchie wrote:
Not when you have a 138‑line main method. I didn’t even bother reading that much code.Winston Gutkowski wrote: . . . Also (and I'm surprised that Campbell didn't spot this, because it's a pet peeve of his ), . . .
By the way: a 138‑line method except for one that initialises a GUI is seriously wrong until proven otherwise, just because of its length.
Lilith Durham wrote:Actually, my instructor demands we use Hungarian notation for all variable names...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Lilith Durham wrote:It needs to use each individual iteration of the Advisee class (student1, student2, or student3) in order to...
I'm not sure I follow this one. I shouldn't say "if (booleanValue = true/false)"?
How do I specify which booleanValue to test?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Lilith Durham wrote:And should the = sign on line 179 be a double in this situation? I'm a bit confused on this one. It's like learning punctuation all over again.
Steve
Steve