0
Может ли кто-нибудь помочь мне с этой проблемой?Информация о методе передачи
import java.util.*;
public class PaintCalculator
{
public static void main(String[] args)
{
double length;
double width;
double height;
Scanner input = new Scanner(System.in);
System.out.print("Enter the length in feet: ");
length = input.nextDouble();
System.out.print("Enter the width in feet: ");
width = input.nextDouble();
System.out.print("Enter the height in feet: ");
height = input.nextDouble();
System.out.println();
PtinSqFt(length,width,height);
System.out.println("The Cost of a " + length + "- by " + width + "-foot room with a " + height + "-foot ceilings is " + newAmount + "$");
}
public static double PtinSqFt(double v1, double v2, double v3)
{
double GoP = v1*v2*v3;
double newAmount;
newAmount = GallonsOfPaint(GoP)*32;
System.out.println("The wall area for the room is " + GoP + " Square Feet!");
System.out.println("You will need " + GallonsOfPaint(GoP) + " gallons of paint!");
System.out.println("The Cost of a " + v1 + "- by " + v2 + "-foot room with a " + v3 + "- foot ceilings is " + newAmount + "$");
return newAmount;
}
public static double GallonsOfPaint(double GoP)
{
final double SQFT_OF_RM = 350;
double newgallons = (GoP/SQFT_OF_RM);
return newgallons;
}
}
Это не будет компилироваться, когда я пытаюсь вытащить информацию возвращения из моего метода PtinSqFt?