/home/caleb/NetBeansProjects/ADSV Java/Lab3_1_CalebFontenot/src/main/java/com/calebfontenot/lab3_1_calebfontenot/Lab3.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package com.calebfontenot.lab3_1_calebfontenot;
import java.util.Scanner;
@author
public class Lab3 {
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
System.out.print("Enter the height (feet): ");
double height;
height = input.nextDouble();
System.out.print("Enter the width (feet):");
double width;
width = input.nextDouble();
double area;
area = height * width;
System.out.println("Calculated area is "+area);
final double GALLONS_PER_SQUARE_FEET = 150.0;
double gallons;
gallons = area/GALLONS_PER_SQUARE_FEET;
System.out.println("The amount of paint is " + gallons +" gallons.");
}
}