回答編集履歴
3
コード修正
test
CHANGED
@@ -82,9 +82,9 @@
|
|
82
82
|
|
83
83
|
|
84
84
|
|
85
|
-
|
85
|
+
// return (int) ( this.price * tax );
|
86
86
|
|
87
|
-
|
87
|
+
return (int) ( price * tax );
|
88
88
|
|
89
89
|
}
|
90
90
|
|
2
補足追記
test
CHANGED
@@ -102,9 +102,9 @@
|
|
102
102
|
|
103
103
|
Price price = new Price();
|
104
104
|
|
105
|
-
price.setPrice(1000);
|
105
|
+
price.setPrice(1000); // 価格は1000円
|
106
106
|
|
107
|
-
price.setTax(1.08);
|
107
|
+
price.setTax(1.08); // 税率は8%
|
108
108
|
|
109
109
|
System.out.println("税込み価格は、" + price.getPriceIncludingTax() + "円です。");
|
110
110
|
|
1
補足追記
test
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
問題にとりかかる前に、下記のように記述を統一したいですね。
|
2
|
+
|
1
|
-
|
3
|
+
シンプルな問題が複雑に見えます。
|
2
4
|
|
3
5
|
|
4
6
|
|