回答編集履歴

1

修正

2021/08/31 02:54

投稿

shiketa
shiketa

スコア4041

test CHANGED
@@ -186,9 +186,21 @@
186
186
 
187
187
  public boolean equals(Object obj) {
188
188
 
189
- return obj != null && this.getClass().equals(obj.getClass()) && this.toString()
189
+ return obj != null && this.getClass().equals(obj.getClass()) && this.localTime.equals(
190
+
190
-
191
+ ((Model) obj).localTime) && this.height == ((Model) obj).height
192
+
193
+ && this.weight == ((Model) obj).weight;
194
+
195
+ }
196
+
197
+
198
+
199
+ @Override
200
+
191
- .equals(obj.toString());
201
+ public int hashCode() {
202
+
203
+ return Objects.hash(localTime, height, weight);
192
204
 
193
205
  }
194
206