Fakultas Ilmu Komputer UI

Commit 5b30711f authored by Bagus Prabowo's avatar Bagus Prabowo
Browse files

CSV Method change

parent dc63dd71
......@@ -5,10 +5,7 @@ import Softeng.Group3.SiJadwal.model.Timetable;
import Softeng.Group3.SiJadwal.repository.CourseList;
import Softeng.Group3.SiJadwal.Main;
import Softeng.Group3.SiJadwal.repository.TimetableList;
import Softeng.Group3.SiJadwal.repository.UserList;
import java.sql.Time;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -20,7 +17,6 @@ public class Student extends Role {
private TimetableList timetableList = new TimetableList();
// User currentUser = Main.currentUser;
@Override
public void exclusiveActions() {
System.out.println("6. Create a timetable");
......
......@@ -38,7 +38,7 @@ public class CSVTimetable {
}
}
public static void updateUser(String Uname, String newType){
public static void updateTimetable(String Uname, String newType){
try{
BufferedReader check = new BufferedReader(new FileReader("Timetable.csv"));
String row;
......@@ -53,7 +53,7 @@ public class CSVTimetable {
newList.add(usersWritten[1]);
newList.add("\n");
} check.close();
FileWriter reader = new FileWriter("Users.csv");
FileWriter reader = new FileWriter("Timetable.csv");
for (String s : newList) {
reader.append(s);
}reader.flush();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment