Skip to content
Open
Show file tree
Hide file tree
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 Feb 6, 2024
5c6c705
Completed Level 2
vimalapugazhan Feb 6, 2024
0eb2de1
Implemented basic functionality for level 3
vimalapugazhan Feb 7, 2024
e2343e0
Completed Level - 3 fully
vimalapugazhan Feb 7, 2024
b8381d7
Completed Level - 4.
vimalapugazhan Feb 8, 2024
8b4b87b
Added messages to stop double marking and unmarking
vimalapugazhan Feb 17, 2024
57b6d91
Added commandIdentifier method
vimalapugazhan Feb 17, 2024
ccd3da5
added input parser to split input to description and task conditions
vimalapugazhan Feb 17, 2024
715c55b
added /help command and changes to case statements for readablility
vimalapugazhan Feb 17, 2024
f0eae4a
prints empty list message
vimalapugazhan Feb 17, 2024
71994ee
Refactor inputParser and commandIdentifier into seperate class. Added…
vimalapugazhan Feb 18, 2024
5e83761
Merge branch 'branch-Level-5'
vimalapugazhan Feb 18, 2024
99799cb
Added packages
vimalapugazhan Feb 18, 2024
bfe0e6b
Added more exceptions for event task and formatted printing
vimalapugazhan Feb 18, 2024
95805b8
Merge branch 'branch-A-Packages'
vimalapugazhan Feb 18, 2024
5ae1ba1
Implemented ArrayList instead of Array of tasks
vimalapugazhan Feb 21, 2024
1883fae
Added delete function and removed commented code
vimalapugazhan Feb 21, 2024
bb9cd02
Level - 7
vimalapugazhan Feb 21, 2024
b699596
Merge branch 'branch-Level-6'
vimalapugazhan Feb 21, 2024
8a24c8d
Merge branch 'branch-Level-7'
vimalapugazhan Feb 21, 2024
a5baff9
removed unnecessary throw
vimalapugazhan Feb 21, 2024
afaa95b
achieved A-Jar
vimalapugazhan Feb 21, 2024
8fd188b
fixed file path and directory creation
vimalapugazhan Feb 23, 2024
69ce325
Remove additional white space bug for todo type tasks
vimalapugazhan Feb 23, 2024
293f494
Refactor decision making code from main
vimalapugazhan Feb 27, 2024
b0f1acc
Replace magic string in main
vimalapugazhan Feb 27, 2024
b47a8a7
Remove most magic string. Refactor code.
vimalapugazhan Feb 27, 2024
7d25560
Merge branch 'MoreOOP'
vimalapugazhan Feb 27, 2024
92e02c7
Fix file visibility
vimalapugazhan Feb 27, 2024
8a35d1f
Fix Spacing
vimalapugazhan Feb 27, 2024
2b44a52
Implement Find Task command
vimalapugazhan Feb 27, 2024
f82932b
Merge branch 'branch-Level-9'
vimalapugazhan Feb 27, 2024
78ff600
Revert "Implement Find Task command"
vimalapugazhan Feb 27, 2024
0c91c3a
no message
vimalapugazhan Feb 27, 2024
a0889ec
complete level-7
vimalapugazhan Feb 27, 2024
9a357a8
Merge pull request #1 from vimalapugazhan/branch-Level-9
vimalapugazhan Feb 27, 2024
2b37913
Modify command list and replace magic string
vimalapugazhan Feb 27, 2024
3e38bc3
Refactor Parser methods
vimalapugazhan Feb 29, 2024
976252d
change package name and imports
vimalapugazhan Feb 29, 2024
1fbd29e
Combine case statements for DELETE and UNMARK commands
vimalapugazhan Feb 29, 2024
f7cf060
Write documentations for some methods
vimalapugazhan Mar 5, 2024
d60df8f
Add additional documentation
vimalapugazhan Mar 7, 2024
0536bf5
Merge pull request #2 from vimalapugazhan/branch-A-JavaDoc
vimalapugazhan Mar 7, 2024
c73af7b
Complete User guide
vimalapugazhan Mar 7, 2024
726b533
Merge branch 'branch-A-JavaDoc'
vimalapugazhan Mar 7, 2024
744f5d9
Merge branch 'master' of https://github.com/vimalapugazhan/ip
vimalapugazhan Mar 7, 2024
c143f9e
Update README.md
vimalapugazhan Mar 7, 2024
c6dd136
Update README.md 2
vimalapugazhan Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
*.txt
258 changes: 246 additions & 12 deletions docs/README.md
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!
__________________________________________________________
```
________________________________________
10 changes: 0 additions & 10 deletions src/main/java/Duke.java

This file was deleted.

3 changes: 3 additions & 0 deletions src/main/java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: main.Aragorn

7 changes: 7 additions & 0 deletions src/main/java/exceptions/AragornException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package exceptions;

public class AragornException extends Exception{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

public AragornException(String text) {
super(text);
}
}
46 changes: 46 additions & 0 deletions src/main/java/main/Aragorn.java
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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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;
}
}

29 changes: 29 additions & 0 deletions src/main/java/tasks/Deadline.java
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();
}
}
Loading