I'm trying to call a method from a different class but I get "Cannot find Symbol" error
I've been trying different variations of declaring variables but my understanding is rather poor. The class that I am calling from (Lawn) compiles and runs correctly. The method setLawnWidth exists and works in the class Lawn.
public class sqrFootCalculator
{
private double pricePerSquareFoot;
private Lawn lawn;
/**
* Constructor for objects of class sqrFootCalculator
*/
public sqrFootCalculator(Lawn lawn)
{
setLawnWidth(lawn);
}
My first class Lawn, does have a method called setLawnWidth, that sets the variable lawnWidth correctly. I'm just unclear on how to call it from an external class. I am setting each variable through it own method which is why nothing is currently written for pricePerSquareFoot.