質問編集履歴
2
メインメソッドのコード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -112,29 +112,33 @@
|
|
112
112
|
|
113
113
|
String[] data = recode.split(",");
|
114
114
|
|
115
|
-
Seiseki ss = new Seiseki(
|
115
|
+
Seiseki ss = new Seiseki(data[0],data[1],Integer.parseInt(data[2]));
|
116
116
|
|
117
|
-
|
117
|
+
ss.compareTo(ss);
|
118
118
|
|
119
|
-
|
119
|
+
seiseki.add(ss);
|
120
120
|
|
121
|
-
|
121
|
+
}
|
122
122
|
|
123
|
+
|
124
|
+
|
125
|
+
for(Seiseki s : seiseki) {
|
126
|
+
|
127
|
+
System.out.println(s.getBango() + s.getName() + s.getTen());
|
128
|
+
|
123
|
-
|
129
|
+
bw.readLine();
|
124
130
|
|
125
131
|
}
|
126
132
|
|
127
133
|
bw.close();
|
128
134
|
|
129
|
-
}
|
135
|
+
}catch (IOException e) {
|
130
136
|
|
131
137
|
e.printStackTrace();
|
132
138
|
|
133
139
|
}
|
134
140
|
|
135
141
|
}
|
136
|
-
|
137
|
-
|
138
142
|
|
139
143
|
}
|
140
144
|
|
1
implements Comparable<Seiseki> を実装
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
public class Seiseki
|
11
|
+
public class Seiseki implements Comparable<Seiseki>{ //Comparable<Seiseki>を実装
|
12
12
|
|
13
13
|
private String bango; //学籍番号
|
14
14
|
|