-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented ability to add new loans using templates #357
Implemented ability to add new loans using templates #357
Conversation
@@ -18,7 +18,7 @@ public CommandDictionary() { | |||
// Add Commands | |||
commandDict.add(new Pair<>("add stock", "<StockType> <StockCode> <Quantity> <Description>")); | |||
commandDict.add(new Pair<>("add stocktype", "<StockType>")); | |||
commandDict.add(new Pair<>("add loan", "<StockCode> <Quantity>")); | |||
commandDict.add(new Pair<>("add loan", "<MatricNo> <StockCode> <Quantity>")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice thanks
|
||
import javax.imageio.ImageTranscoder; | ||
import java.util.ArrayList; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cLAIM YOUR CODE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iTS NOT EVEN THAT MANY LINES
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iTS WHAT THEY WANT TO SEE
String[] addInput = input.split(" +"); | ||
if (Parser.isReserved(addInput[0])) { | ||
throw new BadInputException("'" + addInput[0] + "' is an invalid name as it is a keyword" | ||
+ " for an existing command."); | ||
} | ||
|
||
if (TemplateList.templateExists(addInput[1])) { | ||
return new AddLoanByTemplateCommand(CommandType.ADD, addInput[0], addInput[1]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats a nice way to do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
… into bug_hunting_2 * 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main: Implemented ability to add new loans using templates (AY1920S1-CS2113T-F09-3#357)
* 'master' of https://github.com/AY1920S1-CS2113T-F09-3/main: Implemented ability to add new loans using templates (AY1920S1-CS2113T-F09-3#357)
closes #348