Class PizzaCost
- java.lang.Object
-
- PizzaCost
-
public class PizzaCost extends java.lang.Object
Compute the cost of pizza per square inch- Author:
- Geoff Sutcliffe
-
-
Constructor Summary
Constructors Constructor Description PizzaCost()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static double
computeUnitCost(double diameter, double cost)
Compute the cost per square inchstatic void
main(java.lang.String[] args)
The main method
-
-
-
Field Detail
-
keyboard
private static final java.util.Scanner keyboard
Global Scanner object to use keyboard
-
PI
private static final double PI
Pi is 3.14159265- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
The main method- Parameters:
args
- Passed in from the commend line
-
computeUnitCost
private static double computeUnitCost(double diameter, double cost)
Compute the cost per square inch- Parameters:
diameter
- - Diameter of the pizza in inchescost
- - Cost of the pizza in dollars- Returns:
- The cost per square inch in dollars
-
-