RazorBlade57

Cube

Oct 14th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. //© A+ Computer Science  -  www.apluscompsci.com
  2. //Name - Chris Clemente
  3. //Date - 10-14-2016
  4. //Class - Comp Sci
  5. //Lab  -
  6.  
  7. public class Cube
  8. {
  9.     //instance variables
  10.     private int one, surfacearea;
  11.  
  12.     public void setNums(int num1)
  13.     {
  14.         one = num1;
  15.     }
  16.  
  17.     public void surfacearea( )
  18.     {
  19.        
  20.         surfacearea=(6 * (one * one));
  21.  
  22.     }
  23.     public void print( )
  24.     {
  25.         System.out.println("The surface area is :: "  + surfacearea);
  26.     }
  27. }
Add Comment
Please, Sign In to add comment