Advertisement
wintest

Task 3

May 14th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1.  public class Box {
  2.  
  3.     double width;
  4.     double height;
  5.     double depth;
  6.  
  7.     public Box() {
  8.     }
  9.  
  10.     public Box(double width, double height, double depth) {
  11.         this.width = width;
  12.         this.height = height;
  13.         this.depth = depth;
  14.     }
  15.  
  16.     double volume() {
  17.         return this.width * this.height * this.depth;
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement