Skip to content
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

[Lyu Xingyu] iP #206

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9ab46e1
Level-0: initial skeletal version of the Duke that simply greets the …
Zemdalk Jan 16, 2023
dc3f098
Level-1: Greet, Echo, Exit
Zemdalk Jan 26, 2023
97423b2
Level-2: Add, List
Zemdalk Jan 26, 2023
63a191e
Level-3: Mark as Done
Zemdalk Jan 26, 2023
61029ce
A-CodingStandard
Zemdalk Jan 26, 2023
06ae0dc
Level-4: ToDos, Events, Deadlines
Zemdalk Feb 2, 2023
1fbda4e
A-TextUiTesting
Zemdalk Feb 2, 2023
203fea6
A-TextUiTesting
Zemdalk Feb 2, 2023
5f08aa5
A-CodeQuality: adjust indent and delete some useless comments
Zemdalk Feb 2, 2023
0df796d
code: follow some PRs' suggestions
Zemdalk Feb 8, 2023
3199eec
code: follow some PRs' suggestions
Zemdalk Feb 8, 2023
64bf8a0
Level-5: add exception handlers
Zemdalk Feb 9, 2023
5db98b6
Level-5: remove leading and trailing zeros in exception handling
Zemdalk Feb 9, 2023
34bb510
Merge branch 'branch-Level-5'
Zemdalk Feb 9, 2023
c7547ef
A-Packages
Zemdalk Feb 9, 2023
8e92840
Level-6: Delete
Zemdalk Feb 15, 2023
6d527d3
Level-7: Save
Zemdalk Feb 16, 2023
12d4b97
Level-7: Save
Zemdalk Feb 16, 2023
a6c842d
A-Jar
Zemdalk Feb 16, 2023
52047bb
refactor: modify code according to TA's suggetions
Zemdalk Feb 22, 2023
30ba487
file: add in
Zemdalk Feb 23, 2023
fc51ce6
A-MoreOOP
Zemdalk Feb 23, 2023
acbca13
Level-8: Dates and Times
Zemdalk Feb 23, 2023
5b66aaa
Merge pull request #4 from Zemdalk/branch-Level-8
Zemdalk Feb 23, 2023
bc9d59f
Level-9: Find
Zemdalk Feb 23, 2023
6e9ec36
Merge pull request #5 from Zemdalk/branch-Level-9
Zemdalk Feb 23, 2023
a7fded6
A-JavaDoc
Zemdalk Mar 2, 2023
7fcb84b
A-UserGuide: add a user guide
Zemdalk Mar 2, 2023
a2a863a
A-UserGuide: add a user guide
Zemdalk Mar 2, 2023
b1f0938
A-UserGuide: add a user guide
Zemdalk Mar 2, 2023
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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT

# .class files
*.class
*.jar

# data
data

*.sh
27 changes: 7 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
# Duke project template
# Duke assistant

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.
This is an assistant named Duke that can help you manage your tasks!

## Setting up in Intellij
## Install

Prerequisites: JDK 11, update Intellij to the most recent version.
Go to [Release Page](https://github.com/Zemdalk/ip/releases) and download the latest version of JAR file. Then you can run Duke assistant by running `java -jar Duke.jar`!

1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project first)
1. Open the project into Intellij as follows:
1. Click `Open`.
1. Select the project directory, and click `OK`.
1. If there are any further prompts, accept the defaults.
1. Configure the project to use **JDK 11** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).<br>
In the same dialog, set the **Project language level** field to the `SDK default` option.
3. After that, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
```
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```
## Usage

Please refer to [document](docs/README.md) for detailed usage of Duke commands.
269 changes: 263 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
# User Guide

## Features
## Introduction

### Feature-ABC
This is an assistant named Duke that can help you manage your tasks.

Description of the feature.
## Content

### Feature-XYZ
- [User Guide](#user-guide)
- [Introduction](#introduction)
- [Content](#content)
- [Features](#features)
- [Usage](#usage)
- [`todo` - Add a todo task](#todo---add-a-todo-task)
- [`deadline` - Add a deadline task](#deadline---add-a-deadline-task)
- [`event` - Add an event task](#event---add-an-event-task)
- [`mark` - Mark a task as done](#mark---mark-a-task-as-done)
- [`unmark` - Mark a task as not done](#unmark---mark-a-task-as-not-done)
- [`list` - Show all tasks](#list---show-all-tasks)
- [`find` - Find tasks](#find---find-tasks)
- [`delete` - Delete a task](#delete---delete-a-task)
- [`bye` - Exit the program](#bye---exit-the-program)

Description of the feature.
## Features

## Usage
You can add, mark, unmark, delete tasks in Duke. Generally, there are three types of tasks that Duke can process: `todo`(no start time and end time), `deadline`(no start time but has a deadline) and `event`(has both start time and end time).

Please refer to `Usage` for detailed description of commands and their usage.

<!-- ## Usage

### `Keyword` - Describe action

Expand All @@ -26,4 +43,244 @@ Description of the outcome.

```
expected output
``` -->

## Usage

### `todo` - Add a todo task

You can add a `todo` task by entering:

```
todo <task description>
```

- **Example of usage**

```
todo Return books
```

- **Expected output**

```
____________________________________________________________
Got it. I've added this task:
[T] [ ] Return books
Now you have 1 task in the list.
____________________________________________________________
```

### `deadline` - Add a deadline task

You can add a `deadline` task by entering:

```
deadline <task description> /by <end time>
```

We recommend you to write time in format of "yyyy/MM/dd HH:mm" so Duke can understand the time.

- **Example of usage**

```
deadline Return books /by 2023/03/31 18:00
```

- **Expected output**

```
____________________________________________________________
Got it. I've added this task:
[D] [ ] Return books (by: Mar 31 2023 06:00 PM)
Now you have 2 tasks in the list.
____________________________________________________________
```

### `event` - Add an event task

You can add an `event` task by entering:

```
event <task description> /from <start time> /to <end time>
```

- **Example of usage**:

```
event CS2113 class /from 2023/03/03 16:00 /to 2023/03/03 18:00
```

- **Expected output**

```
____________________________________________________________
Got it. I've added this task:
[E] [ ] CS2113 class (from: Mar 03 2023 04:00 PM to: Mar 03 2023 06:00 PM)
Now you have 3 tasks in the list.
____________________________________________________________
```

### `mark` - Mark a task as done

You can mark a task as done by entering:

```
mark <number of the task>
```

Here "number of the task" is the index number of the task you want to mark when you run `list` command.

- **Example of usage**

```
mark 2
```

- **Expected output**

```
____________________________________________________________
Nice! I've marked this task as done:
[D] [X] Return books (by: Mar 31 2023 06:00 PM)
____________________________________________________________
```

### `unmark` - Mark a task as not done

You can mark a task as not done by entering:

```
unmark <number of the task>
```

- **Example of usage**

```
unmark 3
```

- **Expected output**

```
____________________________________________________________
OK, I've marked this task as not done yet:
[E] [ ] CS2113 class (from: Mar 03 2023 04:00 PM to: Mar 03 2023 06:00 PM)
____________________________________________________________
```

### `list` - Show all tasks

Use `list` to show all tasks.

- **Example of usage**

```
list
```

- **Expected output**

```
____________________________________________________________
1. [T] [ ] Return books
2. [D] [X] Return books (by: Mar 31 2023 06:00 PM)
3. [E] [ ] CS2113 class (from: Mar 03 2023 04:00 PM to: Mar 03 2023 06:00 PM)
____________________________________________________________
```

### `find` - Find tasks

- You can find tasks that has certain pattern string in their description by entering:

```
find <pattern>
```

- **Example of usage**

```
find books
```

- **Expected output**

```
____________________________________________________________
Here are the matching task(s) in your list:
1. [T] [ ] Return books
2. [D] [X] Return books (by: Mar 31 2023 06:00 PM)
(Total 2)
____________________________________________________________
```

- You can find tasks that end before certain date/time by entering:

```
find /by <time>
```

Here time can be either form of `yyyy/MM/dd` or `yyyy/MM/dd HH:mm`.


- **Example of usage**

```
find /by 2023/03/31
```

- **Expected output**

```
____________________________________________________________
Here are the task(s) ending before Mar 31 2023 11:59 PM in your list:
1. [D] [X] Return books (by: Mar 31 2023 06:00 PM)
2. [E] [ ] CS2113 class (from: Mar 03 2023 04:00 PM to: Mar 03 2023 06:00 PM)
(Total 2)
____________________________________________________________
```

### `delete` - Delete a task

You can delete a task by entering:

```
delete <number of the task>
```

- **Example of usage**

```
delete 2
```

- **Expected output**

```
____________________________________________________________
Noted. I've removed this task:
[D] [X] Return books (by: Mar 31 2023 06:00 PM)
Now you have 2 tasks in the list.
____________________________________________________________
```

### `bye` - Exit the program

Use `bye` to exit the program.

Your tasks will be recorded and will not lose. So next time you run Duke assistant, all tasks will be restored!

- **Example of usage**

```
bye
```

- **Expected output**

```
____________________________________________________________
Bye. Hope to see you again soon!
____________________________________________________________
```
> program terminate
10 changes: 0 additions & 10 deletions src/main/java/Duke.java

This file was deleted.

Loading