Initial commit
This commit is contained in:
13
Experiment/src/Exp3/Task1/Test1.java
Normal file
13
Experiment/src/Exp3/Task1/Test1.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package Exp3.Task1;
|
||||
|
||||
public class Test1 {
|
||||
public static void main(String[] args) {
|
||||
Rectangle rect1 = new Rectangle(5, 3);
|
||||
System.out.println("矩形1周长: " + rect1.getC());
|
||||
System.out.println("矩形1面积: " + rect1.getArea());
|
||||
|
||||
Rectangle rect2 = new Rectangle(1, 6, 6, 2);
|
||||
System.out.println("矩形2周长: " + rect2.getC());
|
||||
System.out.println("矩形2面积: " + rect2.getArea());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user