SHARE
TWEET

APCS2012_C4X3_IceCreamConeRunner.java

calcpage Oct 15th, 2012 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. IceCreamConeRunner.java         MrG     2012.1012
  3. purpose:        calculate lateral surface area and volume of a cone
  4. required files: IceCreamConeRunner.java                 main class
  5.                 IceCreamCone.java                       derived class
  6. translator:     javac IceCreamConeRunner.java
  7. interpreter:    java IceCreamConeRunner
  8. */
  9.  
  10. //main class
  11. public class IceCreamConeRunner
  12. {
  13.         public static void main(String[] args)
  14.         {
  15.                 IceCreamCone carvel = new IceCreamCone(1.5,3.5);
  16.                 System.out.println("vol = " + carvel.getVol());
  17.                 System.out.println("vol = " + carvel.surfaceArea());
  18.         }
  19. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top