SHARE
TWEET

Box Class

a guest Apr 23rd, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Box {
  2.     private double w;
  3.     private double l;
  4.     private double h;
  5.  
  6.     public void SetW(double w1)
  7.     {
  8.         w = w1;
  9.     }
  10.     public void SetL(double l1)
  11.     {
  12.         l = l1;
  13.     }
  14.     public void SetH(double h1)
  15.     {
  16.         h = h1;
  17.     }
  18.     public double GetW()
  19.     {
  20.         return w;
  21.     }
  22.     public double GetL()
  23.     {
  24.         return l;
  25.     }
  26.     public double GetH()
  27.     {
  28.         return h;
  29.     }
  30.     public double Area(double Area)
  31.     {
  32.         return w*l;
  33.     }
  34.     public double Volume(double Volume)
  35.     {
  36.         return w*l*h;
  37.     }
  38.  
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top