      class Square2
      {
      private static double area(double side)
      {
      return  side * side;
      }
      private static double perimeter(double side)
      {
      return 4.0 * side;
      }
      public static void main(String[] args)
      {
      System.out.print("请输入边长: ");
      ReaderInput myinput = new ReaderInput();
      double side = myinput.readDouble();
      System.out.println();
      System.out.println("边长 = " + side);
      System.out.println("正方向的面积 = " +area(side));
      System.out.println("正方形的周长 = " + perimeter(side));
      System.out.println();
      }
      }
