Example #1
0
  public static void boxClient() {
    Box b = new Box();
    System.out.println("Length = " + b.getLength());
    System.out.println("Width = " + b.getWidth());
    System.out.println("Height = " + b.getHeight());
    System.out.println("Volume = " + b.volumeOfBox());
    b.setLength(5);
    b.setWidth(5);
    b.setHeight(5);
    System.out.println("Length = " + b.getLength());
    System.out.println("Width = " + b.getWidth());
    System.out.println("Height = " + b.getHeight());
    System.out.println("Volume = " + b.volumeOfBox());

    Box b2 = new Box(6, 7, 8);
    System.out.println("Length = " + b2.getLength());
    System.out.println("Width = " + b2.getWidth());
    System.out.println("Height = " + b2.getHeight());
    System.out.println("Volume = " + b2.volumeOfBox());
  }