1public void readShapeData() throws IOException {
2 Scanner in = new Scanner(System.in);
3 try {
4 System.out.println("Enter the width of the Rectangle: ");
5 width = in.nextDouble();
6 System.out.println("Enter the height of the Rectangle: ");
7 height = in.nextDouble();
8 } finally {
9 in.close();
10 }
11}