Ok I have this sorted now Norm.:o Thanks for your help.
Type: Posts; User: craigjlner
Ok I have this sorted now Norm.:o Thanks for your help.
Ok I've got scruffy sorted :o
Now im trying to make a new dog Spot by doing this:
Spot = new Dog ();
Spot.setName (Spot);
but get error:
I've tried editing the constructor to this:
//constructor: initializes the instance data name and age:
public Dog ()
{
name = Scruffy;
age = 14;
}
Firstly thanks taking the time to help me out.
I can compile and run this program but where I want to print the Dogs name and age (with the toString method) it prints only the age, returning...