PROGRAMMING:Fun graphics
The definition of a given graphical interface is as follows:
interface Shape{
float getArea();// Calculate the area < br / >
float getPerimeter();// Calculate perimeter < br / >
}
Please implement the above interface and define the circular class (represented by number 1) and rectangular class (represented by number 2)< br/>
From the keyboard input graphics category (1 represents circle, 2 represents rectangle) and the corresponding parameters, calculate and output the area and perimeter of the corresponding graphics, the results retain two decimal places of data.
###Input format:
The input data contains multiple lines. The first line contains an integer n, which means that there are n graphic objects to be generated< br/>
Each graph data takes up 2 lines. The first line is the number 1 or 2, which indicates the graph category. The second line is the parameter to generate the graph.
###Output format:
The area and perimeter of each figure.
###Input example:
```in
two
one
one
two
1.0 2.0
```
###Output example:
```out
3.14 6.28
2.00 6.00
```
answer:If there is no answer, please comment
interface Shape{
float getArea();// Calculate the area < br / >
float getPerimeter();// Calculate perimeter < br / >
}
Please implement the above interface and define the circular class (represented by number 1) and rectangular class (represented by number 2)< br/>
From the keyboard input graphics category (1 represents circle, 2 represents rectangle) and the corresponding parameters, calculate and output the area and perimeter of the corresponding graphics, the results retain two decimal places of data.
###Input format:
The input data contains multiple lines. The first line contains an integer n, which means that there are n graphic objects to be generated< br/>
Each graph data takes up 2 lines. The first line is the number 1 or 2, which indicates the graph category. The second line is the parameter to generate the graph.
###Output format:
The area and perimeter of each figure.
###Input example:
```in
two
one
one
two
1.0 2.0
```
###Output example:
```out
3.14 6.28
2.00 6.00
```
answer:If there is no answer, please comment