Skip to content

Commit

Permalink
Merge 45e33f0 into 7ee8353
Browse files Browse the repository at this point in the history
  • Loading branch information
jomcruz93 committed Nov 12, 2018
2 parents 7ee8353 + 45e33f0 commit 62849ae
Showing 1 changed file with 76 additions and 3 deletions.
79 changes: 76 additions & 3 deletions src/main/java/seedu/address/logic/commands/DebugCommand.java
Expand Up @@ -25,6 +25,13 @@
import seedu.address.model.module.ModuleCode;
import seedu.address.model.module.ModuleManager;
import seedu.address.model.module.ModuleName;
import seedu.address.model.note.Note;
import seedu.address.model.note.NoteDate;
import seedu.address.model.note.NoteLocation;
import seedu.address.model.note.NoteManager;
import seedu.address.model.note.NoteText;
import seedu.address.model.note.NoteTime;
import seedu.address.model.note.NoteTitle;
import seedu.address.model.person.Address;
import seedu.address.model.person.Email;
import seedu.address.model.person.MatricNo;
Expand All @@ -50,6 +57,7 @@ public CommandResult execute(Model model, CommandHistory history) throws Command
ClassroomManager classroomManager = ClassroomManager.getInstance();
GradebookManager gradebookManager = new GradebookManager();
GradesManager gradesManager = new GradesManager();
NoteManager noteManager = NoteManager.getInstance();

StorageController.wipeAllProductionData();
StorageController.createFiles();
Expand All @@ -58,6 +66,7 @@ public CommandResult execute(Model model, CommandHistory history) throws Command
moduleManager.clearModules();
model.resetData(new AddressBook());
model.commitAddressBook();
noteManager.clearNotes();

UserManager.getInstance().addUser(new User("defaultUser", "password", 1));
UserManager.getInstance().saveUserList();
Expand Down Expand Up @@ -161,7 +170,6 @@ public CommandResult execute(Model model, CommandHistory history) throws Command
classroomManager.markStudentAttendance(classroom4, specialAttendance, "A0168372L");
classroomManager.modifyStudentAttendance(classroom4, specialAttendance, "A0168372L");


classroomManager.saveClassroomList();

//populated data for Gradebook
Expand All @@ -187,9 +195,74 @@ public CommandResult execute(Model model, CommandHistory history) throws Command
gradesManager.saveGradeList();


noteManager.addNote(new Note(
null,
new NoteTitle("My first note"),
new NoteDate("12-11-2018"),
new NoteTime("11:00 PM"),
new NoteDate("13-11-2018"),
new NoteTime("11:59 PM"),
new NoteLocation("House"),
new NoteText("Hello World!")
)
);
noteManager.addNote(new Note(
new ModuleCode("CS2113"),
new NoteTitle("My second note"),
new NoteDate("15-11-2018"),
new NoteTime("1:00 AM"),
new NoteDate("20-11-2018"),
new NoteTime("6:30 PM"),
new NoteLocation("NUS"),
new NoteText("This is the second note.")
)
);
noteManager.addNote(new Note(
null,
new NoteTitle("Exam schedules"),
null,
new NoteTime("12:00 AM"),
null,
new NoteTime("11:59 PM"),
new NoteLocation(""),
new NoteText("CS2113: 28-12-2018\nCS2040C: 29-12-2018\nCS1010: Tomorrow")
)
);
noteManager.addNote(new Note(
new ModuleCode("CS1010"),
new NoteTitle("note"),
new NoteDate("12-11-2018"),
new NoteTime("11:00 PM"),
new NoteDate("13-11-2018"),
new NoteTime("11:59 PM"),
new NoteLocation("NUS"),
new NoteText("C")
)
);
noteManager.addNote(new Note(
null,
new NoteTitle(""),
null,
new NoteTime("11:00 PM"),
null,
new NoteTime("11:59 PM"),
new NoteLocation(""),
new NoteText("Hello World!")
)
);
noteManager.addNote(new Note(
null,
new NoteTitle("Staff meeting"),
new NoteDate("12-11-2018"),
new NoteTime("11:00 PM"),
new NoteDate("13-11-2018"),
new NoteTime("11:59 PM"),
new NoteLocation("NUS Techno Edge"),
new NoteText("Discuss final exam questions.")
)
);



noteManager.saveNoteList();

return new CommandResult("DEBUG COMMAND EXECUTED. ",
HtmlTableProcessor.getH1Representation("Populated data set."));
Expand Down

0 comments on commit 62849ae

Please sign in to comment.