Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Class ini menyimpan informasi perintah yang akan diinginkan user.
- * Perintah berisi dua string : "Command Word" dan "Second Word".
- *
- * @author Thomas Felix
- * @version 23 November 2020
- */
- public class Command
- {
- private String commandWord;
- private String secondWord;
- public Command(String firstWord, String secondWord)
- {
- commandWord = firstWord;
- this.secondWord = secondWord;
- }
- public String getCommandWord()
- {
- return commandWord;
- }
- public String getSecondWord()
- {
- return secondWord;
- }
- public boolean isUnknown()
- {
- return (commandWord == null);
- }
- public boolean hasSecondWord()
- {
- return (secondWord != null);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement