3日目3段階目完了しました。
This commit is contained in:
17
em-oop/src/Day3Check3.java
Normal file
17
em-oop/src/Day3Check3.java
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
public class Day3Check3 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO 自動生成されたメソッド・スタブ
|
||||
|
||||
//Shape型の変数shapeにradius引数2のCircle代入
|
||||
Shape shape1 = new Circle(2);
|
||||
shape1.showInfo();
|
||||
|
||||
//Shape型の変数2に引数(widthが3、heightが4)を代入する
|
||||
Shape shape2 = new Rectangle(3, 4);
|
||||
shape2.showInfo();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user