Thank you for all your help tonight I really appreciate it!
Type: Posts; User: rayp4993
Thank you for all your help tonight I really appreciate it!
I ended up revising my code and decided to go with
class Square {
public double side;
public double area;
public double perim;
But I already have an instance of Square which is sq right? So it should work if I do sq.getArea(); All I need to do is display the calculation made in getArea...
Thanks, what you are sayin seems right but I just cant grasp it. I made
public double getArea(double a){
area = a * a;
return area;
}
inside class Square, but how can I run that from...
Hello everyone, I am new to java and method calls from outside a class is still a little confusing to me, What I am trying to do is take a square object defined in one class and calculate the area...