I suspect that angle of 45° is a different angle from that you have been told to calculate.
A few minutes ago, I wrote:. . . the angle of the diagonal in the face is 45° . . .
Tony Docherty wrote:... when you are doing a calculation that needs a value provided by one of your methods, call that method rather than using one of the redundant instance variables
Stefan Evans wrote:
And then your other methods should call the baseArea() method any time they need that value.
Because quite rightly you ahve got rid of the haseArea field. No, you should not declare it. You do however have a method with a similar name which calculates said area. Change the field which you haven't got to a method call by the simple technique of adding () to it.
Ted Lorenzo wrote:. . .
Cube.java:17: cannot find symbol
symbol : variable baseArea
location: class Cube
return 6 * baseArea;
Do i have to declare it somewhere?