forked from nus-cs2103-AY2223S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 0
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 nus-cs2103-AY2223S2#65 from nerdyboy98/master
Updated UI text and added new Help Classes
- Loading branch information
Showing
9 changed files
with
93 additions
and
6 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
19 changes: 19 additions & 0 deletions
19
src/main/java/seedu/address/logic/commands/HelpConsultationCommand.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import seedu.address.model.Model; | ||
|
||
/** | ||
* Help instruction for Consultation command | ||
*/ | ||
public class HelpConsultationCommand extends HelpCommand { | ||
|
||
public static final String COMMAND_WORD = "help consultation"; | ||
|
||
public static final String CONSULTATION_SYNTAX = "Consultation Input Format:\n" | ||
+ "touch recur [name] Consultations [day] [time] [duration] [period]"; | ||
|
||
@Override | ||
public CommandResult execute(Model model) { | ||
return new CommandResult(CONSULTATION_SYNTAX); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/seedu/address/logic/commands/HelpLabCommand.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import seedu.address.model.Model; | ||
|
||
/** | ||
* Help instruction for Lab command | ||
*/ | ||
public class HelpLabCommand extends HelpCommand { | ||
|
||
public static final String COMMAND_WORD = "help lab"; | ||
|
||
public static final String LAB_SYNTAX = "Labs Input Format:\n" | ||
+ "touch recur [name] Labs [day] [time] [duration] [period] "; | ||
|
||
@Override | ||
public CommandResult execute(Model model) { | ||
return new CommandResult(LAB_SYNTAX); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/seedu/address/logic/commands/HelpTutorialCommand.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import seedu.address.model.Model; | ||
|
||
/** | ||
* Help instruction for Tutorial command | ||
*/ | ||
public class HelpTutorialCommand extends HelpCommand { | ||
|
||
public static final String COMMAND_WORD = "help tutorial"; | ||
|
||
public static final String TUTORIAL_SYNTAX = "Tutorial Input Format:\n" | ||
+ "touch recur [name] Tutorials [day] [time] [duration] [period] "; | ||
|
||
@Override | ||
public CommandResult execute(Model model) { | ||
return new CommandResult(TUTORIAL_SYNTAX); | ||
} | ||
} |
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
31 changes: 31 additions & 0 deletions
31
src/main/java/seedu/address/logic/parser/HelpCommandParser.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package seedu.address.logic.parser; | ||
|
||
import seedu.address.logic.commands.HelpCommand; | ||
import seedu.address.logic.commands.HelpConsultationCommand; | ||
import seedu.address.logic.commands.HelpLabCommand; | ||
import seedu.address.logic.commands.HelpTutorialCommand; | ||
import seedu.address.logic.parser.exceptions.ParseException; | ||
|
||
/** | ||
* Parses input arguments and creates a new HelpCommand, HelpTutorialCommand, | ||
* HelpLabCommand or HelpConsultationCommand object | ||
*/ | ||
public class HelpCommandParser { | ||
/** | ||
* Parses the given {@code String} of arguments in the context of the HelpCommand | ||
* and returns an HelpCommand object for execution. | ||
* @throws ParseException if the user input does not conform the expected format | ||
*/ | ||
|
||
public HelpCommand parse(String args) { | ||
if (args.equals(" tutorial")) { | ||
return new HelpTutorialCommand(); | ||
} else if (args.equals(" lab")) { | ||
return new HelpLabCommand(); | ||
} else if (args.equals(" consultation")) { | ||
return new HelpConsultationCommand(); | ||
} else { | ||
return new HelpCommand(); | ||
} | ||
} | ||
} |
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