getter, setter, and toString() methods in java?
in
Programming Questions
•
5 months ago
don't know if i can post this here, im using bluej...
So I need to create two classes: 1 class for a rectangle and 1 class for a circle with all necessary variables, constants, and methods.
And I'm stuck on :
public double calculatePerimeter ( double p){
p=2.0*(x+y);
return p;
}
(this is in my main class that controls the other classes)
and in my other class "Shape" I tried to system.out.print that and it doesn't work
I also have a string toString function...
not sure if its my syntax or something else
help?
1