Originally Posted by
KevinWorkman
You're preaching to the choir on that one. But try reading through the tutorial and taking another look at the assignment. If you're still having trouble, post what you've tried along with any errors you get, and we'll go from there.
Went out last night instead of doing thus but sat down this morning and read through all the advice here and the links, sucessfully got it working
class Counter
{
public int count = 0;
//Return the value of the counter
public long getValue(){
return count;
}
//Reset the value of the counter to 0
public void reset(){
count = 0;
}
//Increment the counter by 1
public void inc(){
count++;
}
//Decrement the counter by 1
public void dec(){
count--;
}
}
Very simple in the end, never been told about public variables and such.