forked from nus-cs2113-AY2223S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from darrenangwx/branch-refactorPR
Refactoring after PR merge
- Loading branch information
Showing
22 changed files
with
182 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
.../DeadlineCommand/ViewDeadlineCommand.java → ...ommands/deadline/ViewDeadlineCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
src/main/java/commands/AddStaffCommand.java → .../java/commands/staff/AddStaffCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
package commands; | ||
package commands.staff; | ||
|
||
import commands.Command; | ||
import entity.Staff; | ||
import manager.StaffManager; | ||
import ui.TextUi; | ||
|
||
public class AddStaffCommand extends Command{ | ||
public class AddStaffCommand extends Command { | ||
public static final String COMMAND_WORD = "add_staff"; | ||
private String name; | ||
private String workingDay; | ||
private String phoneNumber; | ||
private String dateOfBirth; | ||
public AddStaffCommand(String name, String workingDay, String phoneNumber, String dateOfBirth){ | ||
|
||
public AddStaffCommand(String name, String workingDay, String phoneNumber, String dateOfBirth) { | ||
this.name = name; | ||
this.workingDay = workingDay; | ||
this.phoneNumber = phoneNumber; | ||
this.dateOfBirth = dateOfBirth; | ||
} | ||
|
||
@Override | ||
public void execute (TextUi ui){ | ||
public void execute(TextUi ui) { | ||
Staff staff = new Staff(this.name, this.workingDay, this.phoneNumber, this.dateOfBirth); | ||
StaffManager.addStaff(staff); | ||
ui.printMessage(staff + " added!"); | ||
} | ||
|
||
@Override | ||
public boolean isExit (){ | ||
public boolean isExit() { | ||
return false; | ||
} | ||
} |
4 changes: 3 additions & 1 deletion
4
...ain/java/commands/DeleteStaffCommand.java → ...va/commands/staff/DeleteStaffCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/main/java/commands/ViewStaffCommand.java → ...java/commands/staff/ViewStaffCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.