content: 
  // Separate interface for 2D shapes
  interface TwoDimensionalShape {
      double area();
  }
  
  // Separate interface for 3D shapes
  interface ThreeDimensionalShape {
      double area();
      double volume();
  }
  
  // Square implements only the 2D interface
  class Square implements TwoDimensionalShape {
      private double side;
  
      public Square(double s) {
          this.side = s;
      }
  
      @Override
      public double area() {
          return side * side;
      }
  }
  
  // Rectangle implements only the 2D interface
  class Rectangle implements TwoDimensionalShape {
      private double length, width;
  
      public Rectangle(double l, double w) {
          this.length = l;
          this.width  = w;
      }
  
      @Override
      public double area() {
          return length * width;
      }
  }
  
  // Cube implements the 3D interface
  class Cube implements ThreeDimensionalShape {
      private double side;
  
      public Cube(double s) {
          this.side = s;
      }
  
      @Override
      public double area() {
          return 6 * side * side;
      }
  
      @Override
      public double volume() {
          return side * side * side;
      }
  }
  
  public class ISPFollowed {
      public static void main(String[] args) {
          TwoDimensionalShape square    = new Square(5);
          TwoDimensionalShape rectangle = new Rectangle(4, 6);
          ThreeDimensionalShape cube     = new Cube(3);
  
          System.out.println("Square Area: "    + square.area());
          System.out.println("Rectangle Area: " + rectangle.area());
          System.out.println("Cube Area: "      + cube.area());
          System.out.println("Cube Volume: "    + cube.volume());
      }
  }
  