illegal start of expression
It prints out the Dog information from the superclass but nothing from the PetDog sub-class... here is the revised code.
Bryan Peach wrote:As i have said before i am very new to this and really have no idea what i am doing.. so no i didn't know that so what do you suggest i do with this code?
Breed is: Rotweiller
Weight is: 125 lbs.
Sex is: Male
Age is: 3
Bryan Peach wrote:When I run My PetDogDriver this is the output I am getting:
Breed is: Rotweiller
Weight is: 125 lbs.
Sex is: Male
Age is: 3
But nothing about the fields that the PetDog subclass is supposed to take care of.
I hope you aren't paying a lot for this courseBryan Peach wrote: probably a big mistake..
Bryan Peach wrote:No sorry.. I haven't been taught that... I am doing this course through correspondance... probably a big mistake.. but i'll take a look at that tutorial
Bryan Peach wrote:So does this code look better?
Bryan Peach wrote:hahaha no... this line:
is giving me a bunch of ')' expected and illegal start of expression errors... i cannot figure out why.
Illegal start of expression errors are usually caused by too many {s or too few }. Get a text editor which supports bracket matching (eg gedit, Kate [for Linux], NotePad++ Notepad2 or jEdit [for Windows]). When you put your mouse onto a ([{ or )]} the paired symbol changes colour. Use that to count your brackets and braces and things. You are only allowed to use the keyword public one indent level away from the left margin, if your indentation correctly reflects the {} structure.Bryan Peach wrote:hahaha no... this line:
. . .
is giving me a bunch of ')' expected and illegal start of expression errors... i cannot figure out why.
Breed is: Rotweiller
Weight is: 125 lbs.
Sex is: Male
Age is: 3
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |