daily pastebin goal
70%
SHARE
TWEET

APCS2012_C4X9_SodaCanTester.java

calcpage Oct 18th, 2012 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. SodaCanTester.java      MrG     2012.1010
  3. purpose:        calculate volume and surface area of a cylinder
  4. required files: SodaCanTester.java              main class
  5.                 SodaCan.java                    derived class
  6. translator:     javac SodaCanTester.java
  7. interperter:    java SodaCanTester d h
  8. */
  9.  
  10. //main class
  11. public class SodaCanTester
  12. {
  13.         public static void main(String[] args)
  14.         {
  15.                 double d = Double.parseDouble(args[0]);
  16.                 double h = Double.parseDouble(args[1]);
  17.                 SodaCan emmerson = new SodaCan(d,h);
  18.                 System.out.println("d = " + emmerson.getD());
  19.                 System.out.println("h = " + emmerson.getH());
  20.                 System.out.println("v = " + emmerson.getV());
  21.                 System.out.println("s = " + emmerson.getS());
  22.         }
  23. }
RAW Paste Data
Top