March 31, 2008
Open Question: cannot find symbol error message?
import javax.swing.JOptionPane;
public class PaintJobtrial
{
public static void main(String[] args)
{
double rooms;
String input = JOptionPane.showInputDialog("Enter the number of rooms to be painted.");
rooms = Double.parseDouble(input);
double feet=0, totalFeet=0;
for (double i=1; i<=rooms; i++)
{
input = JOptionPane.showInputDialog("How many square feet of wall space are in room " + i + "?");
feet= Double.parseDouble(input);
totalFeet = totalFeet + rooms;
}
double totalGallons = calcGallons(totalFeet);
JOptionPane.showMessageDialog(null, "The total number of gallons of paint required is " + totalGallons);
}
public static double totalGallons(double feet)
{
double gallons = feet / 115;
return gallons;
}
}
It gives me this message :
File: /Users/Jennifer/PaintJobtrial.java [line: 19]
Error: cannot find symbol
symbol : method calcGallons(double)
location: class PaintJobtrial