-
Notifications
You must be signed in to change notification settings - Fork 184
[vimalapugazhan] iP #188
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
Open
vimalapugazhan
wants to merge
48
commits into
nus-cs2113-AY2324S2:master
Choose a base branch
from
vimalapugazhan:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[vimalapugazhan] iP #188
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
ab7d967
Changed bot name to Aragorn and implemented Echo for level 1
vimalapugazhan 5c6c705
Completed Level 2
vimalapugazhan 0eb2de1
Implemented basic functionality for level 3
vimalapugazhan e2343e0
Completed Level - 3 fully
vimalapugazhan b8381d7
Completed Level - 4.
vimalapugazhan 8b4b87b
Added messages to stop double marking and unmarking
vimalapugazhan 57b6d91
Added commandIdentifier method
vimalapugazhan ccd3da5
added input parser to split input to description and task conditions
vimalapugazhan 715c55b
added /help command and changes to case statements for readablility
vimalapugazhan f0eae4a
prints empty list message
vimalapugazhan 71994ee
Refactor inputParser and commandIdentifier into seperate class. Added…
vimalapugazhan 5e83761
Merge branch 'branch-Level-5'
vimalapugazhan 99799cb
Added packages
vimalapugazhan bfe0e6b
Added more exceptions for event task and formatted printing
vimalapugazhan 95805b8
Merge branch 'branch-A-Packages'
vimalapugazhan 5ae1ba1
Implemented ArrayList instead of Array of tasks
vimalapugazhan 1883fae
Added delete function and removed commented code
vimalapugazhan bb9cd02
Level - 7
vimalapugazhan b699596
Merge branch 'branch-Level-6'
vimalapugazhan 8a24c8d
Merge branch 'branch-Level-7'
vimalapugazhan a5baff9
removed unnecessary throw
vimalapugazhan afaa95b
achieved A-Jar
vimalapugazhan 8fd188b
fixed file path and directory creation
vimalapugazhan 69ce325
Remove additional white space bug for todo type tasks
vimalapugazhan 293f494
Refactor decision making code from main
vimalapugazhan b0f1acc
Replace magic string in main
vimalapugazhan b47a8a7
Remove most magic string. Refactor code.
vimalapugazhan 7d25560
Merge branch 'MoreOOP'
vimalapugazhan 92e02c7
Fix file visibility
vimalapugazhan 8a35d1f
Fix Spacing
vimalapugazhan 2b44a52
Implement Find Task command
vimalapugazhan f82932b
Merge branch 'branch-Level-9'
vimalapugazhan 78ff600
Revert "Implement Find Task command"
vimalapugazhan 0c91c3a
no message
vimalapugazhan a0889ec
complete level-7
vimalapugazhan 9a357a8
Merge pull request #1 from vimalapugazhan/branch-Level-9
vimalapugazhan 2b37913
Modify command list and replace magic string
vimalapugazhan 3e38bc3
Refactor Parser methods
vimalapugazhan 976252d
change package name and imports
vimalapugazhan 1fbd29e
Combine case statements for DELETE and UNMARK commands
vimalapugazhan f7cf060
Write documentations for some methods
vimalapugazhan d60df8f
Add additional documentation
vimalapugazhan 0536bf5
Merge pull request #2 from vimalapugazhan/branch-A-JavaDoc
vimalapugazhan c73af7b
Complete User guide
vimalapugazhan 726b533
Merge branch 'branch-A-JavaDoc'
vimalapugazhan 744f5d9
Merge branch 'master' of https://github.com/vimalapugazhan/ip
vimalapugazhan c143f9e
Update README.md
vimalapugazhan c6dd136
Update README.md 2
vimalapugazhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -15,3 +15,4 @@ bin/ | |
|
|
||
| /text-ui-test/ACTUAL.TXT | ||
| text-ui-test/EXPECTED-UNIX.TXT | ||
| *.txt | ||
This file contains hidden or 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,29 +1,263 @@ | ||
| # User Guide | ||
| # Aragorn | ||
| ________________________________ | ||
| Aragorn is a simple chatbot that helps you tracks your tasks! | ||
| ## Quick Start | ||
| 1. Ensure you have Java 11 or above installed on your computer. | ||
| 2. Download the latest joe.jar release [here](https://github.com/vimalapugazhan/ip/releases). | ||
| 3. Copy the file to a folder you want as the home directory of the file. | ||
| 4. From the command terminal, `cd` into the home directory of the jar file and run the command `java -jar Aragorn.jar` to launch the application. | ||
| 5. Type a command in the command box and press Enter to execute it. Refer to **Features** below for details of each available command. | ||
|
|
||
| ## Features | ||
|
|
||
| ### Feature-ABC | ||
| - ### Add task | ||
|
|
||
| Description of the feature. | ||
| - Add 3 different types of tasks; ToDo, Deadline and Event. | ||
|
|
||
| ### Feature-XYZ | ||
| - ### Delete task | ||
|
|
||
| Description of the feature. | ||
| - Remove a task from the list. | ||
|
|
||
| ## Usage | ||
| - ### Mark and Unmark | ||
|
|
||
| ### `Keyword` - Describe action | ||
| - Mark a task complete. | ||
| - Unmark a completed task. | ||
|
|
||
| Describe the action and its outcome. | ||
| - ### Find task | ||
|
|
||
| Example of usage: | ||
| - Find tasks containing inputted keyword. | ||
|
|
||
| `keyword (optional arguments)` | ||
| - ### Save and Load | ||
|
|
||
| - Automatically saves the list when a command is run and loads it the next time the program is launched. | ||
|
|
||
| ## Commands | ||
|
|
||
| ### `todo` - Add ToDo task | ||
|
|
||
| Usage: | ||
|
|
||
| `todo <description>` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| ``` | ||
| todo Read book | ||
| __________________________________________________________ | ||
| Got it. I've added this task: | ||
| [T][ ] Read book | ||
|
|
||
| You have 1 / 1 remaining tasks in the list. | ||
| __________________________________________________________ | ||
| ``` | ||
| ________________________________________ | ||
| ### `deadline` - Add Deadline task | ||
|
|
||
| Usage: | ||
|
|
||
| `deadline <description> /by <deadline>` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| ``` | ||
| deadline CG2113 Quiz /by Friday 12pm | ||
| __________________________________________________________ | ||
| Got it. I've added this task: | ||
| [D][ ] CG2113 Quiz (by: Friday 12pm) | ||
|
|
||
| You have 2 / 2 remaining tasks in the list. | ||
| __________________________________________________________ | ||
| ``` | ||
| ________________________________________ | ||
| ### `event` - Add Event task | ||
|
|
||
| Usage: | ||
|
|
||
| `event <description> /from <start> /by <end>` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| ``` | ||
| event Birthday party /from Sunday 5pm /to 10pm | ||
| __________________________________________________________ | ||
| Got it. I've added this task: | ||
| [E][ ] Birthday party (from: Sunday 5pm to: 10pm) | ||
|
|
||
| You have 3 / 3 remaining tasks in the list. | ||
| __________________________________________________________ | ||
| ``` | ||
| ________________________________________ | ||
| ### `list` - Display list | ||
|
|
||
| Usage: | ||
|
|
||
| `list` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| Description of the outcome. | ||
| ``` | ||
| list | ||
| __________________________________________________________ | ||
|
|
||
| Here are the tasks in your list: | ||
| 1. [T][ ] Read book | ||
| 2. [D][ ] CG2113 Quiz (by: Friday 12pm) | ||
| 3. [E][ ] Birthday party (from: Sunday 5pm to: 10pm) | ||
|
|
||
|
|
||
| You have 3 / 3 remaining tasks in the list. | ||
| __________________________________________________________ | ||
| ``` | ||
| ________________________________________ | ||
| ### `mark` - Mark task as complete | ||
|
|
||
| Usage: | ||
|
|
||
| `mark <index>` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| ``` | ||
| mark 2 | ||
| __________________________________________________________ | ||
| Nice! I've marked this task as done: | ||
| [D][X] CG2113 Quiz (by: Friday 12pm) | ||
|
|
||
| You have 2 / 3 remaining tasks in the list. | ||
| __________________________________________________________ | ||
| ``` | ||
| ________________________________________ | ||
| ### `unmark` - Unmark a completed task | ||
|
|
||
| Usage: | ||
|
|
||
| `unmark <index>` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| ``` | ||
| unmark 2 | ||
| __________________________________________________________ | ||
| OK, I've marked this task as incomplete: | ||
| [D][ ] CG2113 Quiz (by: Friday 12pm) | ||
|
|
||
| You have 3 / 3 remaining tasks in the list. | ||
| __________________________________________________________ | ||
| ``` | ||
| ________________________________________ | ||
| ### `find` - Display a list of task containing keyword | ||
|
|
||
| Usage: | ||
|
|
||
| `find <keyword>` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| ``` | ||
| list | ||
| __________________________________________________________ | ||
|
|
||
| Here are the tasks in your list: | ||
| 1. [T][ ] Read book | ||
| 2. [D][X] CG2113 Quiz (by: Friday 12pm) | ||
| 3. [E][ ] Birthday party (from: Sunday 5pm to: 10pm) | ||
| 4. [E][ ] 2113 meeting (from: Tuesday 6pm to: 7pm) | ||
|
|
||
|
|
||
| You have 3 / 4 remaining tasks in the list. | ||
| __________________________________________________________ | ||
|
|
||
| find 2113 | ||
| __________________________________________________________ | ||
|
|
||
| Here are the tasks in your list: | ||
| 1. [D][X] CG2113 Quiz (by: Friday 12pm) | ||
| 2. [E][ ] 2113 meeting (from: Tuesday 6pm to: 7pm) | ||
|
|
||
|
|
||
| 2 matching tasks found! | ||
| __________________________________________________________ | ||
|
|
||
| ``` | ||
| ________________________________________ | ||
| ### `delete` - Delete task from list | ||
|
|
||
| Usage: | ||
|
|
||
| `delete <index in list>` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| ``` | ||
| delete 2 | ||
| __________________________________________________________ | ||
| I've deleted this task from the list: | ||
| [D][X] CG2113 Quiz (by: Friday 12pm) | ||
|
|
||
| You have 3 / 3 remaining tasks in the list. | ||
| __________________________________________________________ | ||
|
|
||
| list | ||
| __________________________________________________________ | ||
|
|
||
| Here are the tasks in your list: | ||
| 1. [T][ ] Read book | ||
| 2. [E][ ] Birthday party (from: Sunday 5pm to: 10pm) | ||
| 3. [E][ ] 2113 meeting (from: Tuesday 6pm to: 7pm) | ||
|
|
||
|
|
||
| You have 3 / 3 remaining tasks in the list. | ||
| __________________________________________________________ | ||
|
|
||
| ``` | ||
| ________________________________________ | ||
| ### `help` - Display command list | ||
|
|
||
| Usage: | ||
|
|
||
| `help` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| ``` | ||
| help | ||
| __________________________________________________________ | ||
| Here is a list of commands: | ||
|
|
||
| "list": Displays list of tasks. | ||
|
|
||
| "todo <description>": Adds a Todo task to the list. | ||
|
|
||
| "deadline <description> /by <deadline>": Adds a task and its deadline to the list. | ||
|
|
||
| "event <description> /from <start> /to <end>": Adds an event and its start and end conditions to the list. | ||
|
|
||
| "mark <task number>": Marks the corresponding task in the list as completed. | ||
|
|
||
| "unmark <task number>": Marks the corresponding task in the list as incomplete. | ||
|
|
||
| "delete <task number>": Removes the corresponding task from the list. | ||
|
|
||
| "find <keyword>": Displays the tasks containing the keyword. | ||
|
|
||
| "help": Displays this list of commands. | ||
|
|
||
| "bye": Closes the program. | ||
| __________________________________________________________ | ||
| ``` | ||
| ________________________________________ | ||
| ### `bye` - Exits the program | ||
|
|
||
| Example of usage: | ||
|
|
||
| `bye` | ||
|
|
||
| Expected outcome: | ||
|
|
||
| ``` | ||
| expected output | ||
| bye | ||
| __________________________________________________________ | ||
| Farewell. May we meet again! | ||
| __________________________________________________________ | ||
| ``` | ||
| ________________________________________ |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,3 @@ | ||
| Manifest-Version: 1.0 | ||
| Main-Class: main.Aragorn | ||
|
|
This file contains hidden or 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,7 @@ | ||
| package exceptions; | ||
|
|
||
| public class AragornException extends Exception{ | ||
| public AragornException(String text) { | ||
| super(text); | ||
| } | ||
| } | ||
This file contains hidden or 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,46 @@ | ||
| package main; | ||
|
|
||
| import java.io.IOException; | ||
| import java.util.ArrayList; | ||
| import exceptions.AragornException; | ||
| import utilities.commands.CommandExecuter; | ||
| import utilities.commands.CommandIdentifier; | ||
| import ui.Constants; | ||
| import utilities.file.FileReader; | ||
| import utilities.file.FileWriter; | ||
| import tasks.Task; | ||
| import java.util.Scanner; | ||
| /** | ||
| * A task tracker that allows users to add, delete, find, list, nark, and saves the list. | ||
| */ | ||
| public class Aragorn { | ||
|
|
||
| private static final ArrayList<Task> list = new ArrayList<>(); | ||
|
|
||
| public static void main(String[] args) throws AragornException { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this function is also very long (>30 LOC) |
||
| System.out.println(Constants.HELLOMESSAGE); | ||
| try { | ||
| FileReader.readFile(); | ||
| } catch (IOException e) { | ||
| System.out.println(Constants.FILEREADERROR); | ||
| } | ||
| Scanner in = new Scanner(System.in); | ||
| while(true) { | ||
| String userInput; | ||
| userInput = in.nextLine(); | ||
| String commandType = CommandIdentifier.commandIdentifier(userInput); | ||
| if (commandType.equals(Constants.BYE)) { | ||
| System.out.println(Constants.BYEMESSAGE); | ||
| FileWriter.writeFile(); | ||
| return; | ||
| } | ||
| CommandExecuter.executeCommand(userInput, commandType); | ||
| FileWriter.writeFile(); | ||
| } | ||
| } | ||
|
|
||
| public static ArrayList<Task> getList() { | ||
| return list; | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or 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,29 @@ | ||
| package tasks; | ||
|
|
||
| /** | ||
| * Deadline task with details on the description, deadline condition and whether it's complete. | ||
| */ | ||
| public class Deadline extends Task { | ||
|
|
||
| protected String deadline; | ||
|
|
||
| public Deadline(String description, boolean isDone, String date) { | ||
| super(description, isDone); | ||
| deadline = date; | ||
| } | ||
|
|
||
| @Override | ||
| public String getDescription() { | ||
| return description + " (by: " + deadline + ")"; | ||
| } | ||
|
|
||
| @Override | ||
| public String toFileString() { | ||
| return String.format("deadline|%s|%s|%s", isDone ? "1" : "0", description, deadline); | ||
| } | ||
|
|
||
| @Override | ||
| public String taskString() { | ||
| return "[D]" + "[" + getStatusIcon() + "] " + getDescription(); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
good