Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f262862
Level 0. Rename, Greet, Exit
haowern98 Mar 1, 2024
ee06ba5
[haowern98] ip
haowern98 Mar 1, 2024
ca2b98f
Level 0. Rename, Greet, Exit
haowern98 Mar 6, 2024
492a18e
Level 1. Echo
haowern98 Mar 6, 2024
81ef55c
Level 2. Add, List
haowern98 Mar 6, 2024
3d218f7
Level-3 : Mark as Done
haowern98 Mar 6, 2024
46506cd
A-CodingStandard
haowern98 Mar 6, 2024
68c0ab2
Level 4. ToDos, Events, Deadlines
haowern98 Mar 7, 2024
7a1d824
Level 4. ToDos, Events, Deadlines
haowern98 Mar 7, 2024
a1e4afe
Level 4. ToDos, Events, Deadlines
haowern98 Mar 7, 2024
16274a4
Level 4. ToDos, Events, Deadlines
haowern98 Mar 7, 2024
443a681
Level 4. ToDos, Events, Deadlines
haowern98 Mar 7, 2024
f230d8d
Level 4. ToDos, Events, Deadlines
haowern98 Mar 7, 2024
6378f3b
A-CodeQuality
haowern98 Mar 7, 2024
58efeb1
Level 5. Handle Errors
haowern98 Mar 7, 2024
f4533c7
Level 5. Handle Errors
haowern98 Mar 7, 2024
66017ad
Cleaned up code
haowern98 Mar 7, 2024
4dda996
Added comments and cleaned up code
haowern98 Mar 7, 2024
6cdd02e
Merge pull request #1 from haowern98/branch-Level-5
haowern98 Mar 7, 2024
a0f892a
Update Duke.java
haowern98 Mar 7, 2024
046ee29
Update Deadline.java
haowern98 Mar 8, 2024
4899624
Update Duke.java
haowern98 Mar 8, 2024
831607a
Update DukeException.java
haowern98 Mar 8, 2024
6a719fd
Update Event.java
haowern98 Mar 8, 2024
4cb7259
Create Storage.java
haowern98 Mar 8, 2024
dc91d0f
Update Task.java
haowern98 Mar 8, 2024
73a83f2
Update Todo.java
haowern98 Mar 8, 2024
0912e81
Merge pull request #2 from haowern98/branch-Level-6
haowern98 Mar 8, 2024
9805975
Merge branch 'master' into branch-Level-7
haowern98 Mar 8, 2024
6166632
Merge pull request #3 from haowern98/branch-Level-7
haowern98 Mar 8, 2024
c6dce32
Update Deadline.java
haowern98 Mar 8, 2024
13986cb
Create Parser.java
haowern98 Mar 8, 2024
f16d54c
Create Ui.java
haowern98 Mar 8, 2024
593b34b
Create TaskList.java
haowern98 Mar 8, 2024
d9d8b08
Update Duke.java
haowern98 Mar 8, 2024
cb8b0e5
Update Event.java
haowern98 Mar 8, 2024
7297c72
Update Storage.java
haowern98 Mar 8, 2024
e829ff0
Update Task.java
haowern98 Mar 8, 2024
d0f8ae5
Update Todo.java
haowern98 Mar 8, 2024
63598e7
Update Duke.java
haowern98 Mar 8, 2024
019d8d3
Update Event.java
haowern98 Mar 8, 2024
8316d65
Update Parser.java
haowern98 Mar 8, 2024
23a45e3
Update Storage.java
haowern98 Mar 8, 2024
75644bd
Update Task.java
haowern98 Mar 8, 2024
03cd94e
Update TaskList.java
haowern98 Mar 8, 2024
b46870e
Update Ui.java
haowern98 Mar 8, 2024
a6c7c01
Merge pull request #4 from haowern98/Branch-Level-9
haowern98 Mar 8, 2024
3ae3058
Update Duke.java
haowern98 Mar 8, 2024
f9a9490
Update Deadline.java
haowern98 Mar 8, 2024
3d48267
Update DukeException.java
haowern98 Mar 8, 2024
2c9db56
Update Event.java
haowern98 Mar 8, 2024
e751e5c
Update Parser.java
haowern98 Mar 8, 2024
384810c
Update Storage.java
haowern98 Mar 8, 2024
5f8a7e1
Update Task.java
haowern98 Mar 8, 2024
a72e61d
Update README.md
haowern98 Mar 8, 2024
9120e9c
Revise user guide
haowern98 May 18, 2026
0fd0bbe
Rewrite user guide
haowern98 May 18, 2026
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
29 changes: 0 additions & 29 deletions docs/README.md

This file was deleted.

210 changes: 210 additions & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# User Guide

## Introduction

Sparky is a command-line task manager for tracking todos, deadlines, and events. You can add tasks, list them, mark them as done, remove them, and search for them by keyword.

## Quick Start

1. Start the application.
2. Enter commands one at a time in the terminal.
3. Use `bye` to exit the program.

## Command Summary

- `todo <description>`: Adds a todo task
- `deadline <description> /by <date>`: Adds a deadline task
- `event <description> /from <start> /to <end>`: Adds an event task
- `list`: Shows all tasks
- `mark <task number>`: Marks a task as done
- `unmark <task number>`: Marks a task as not done
- `delete <task number>`: Deletes a task
- `find <keyword>`: Finds tasks containing a keyword
- `bye`: Exits the program

## Features

### Adding a todo: `todo`

Adds a todo task to the task list.

Format:

`todo <description>`

Example:

`todo read book`

Expected outcome:

```text
Got it. I've added this task:
[T][ ] read book
Now you have X tasks in the list.
```

### Adding a deadline: `deadline`

Adds a deadline task with a due date.

Format:

`deadline <description> /by <date>`

Example:

`deadline return book /by June 6th`

Expected outcome:

```text
Got it. I've added this task:
[D][ ] return book (by: June 6th)
Now you have X tasks in the list.
```

### Adding an event: `event`

Adds an event task with a start time and end time.

Format:

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

Example:

`event project meeting /from 2pm /to 4pm`

Expected outcome:

```text
Got it. I've added this task:
[E][ ] project meeting (from: 2pm to: 4pm)
Now you have X tasks in the list.
```

### Listing tasks: `list`

Shows the tasks currently stored in the list.

Format:

`list`

Example:

`list`

Expected outcome:

```text
Here are the tasks in your list:
1.[T][ ] read book
2.[D][ ] return book (by: June 6th)
3.[E][ ] project meeting (from: 2pm to: 4pm)
```

### Marking a task: `mark`

Marks a task as done.

Format:

`mark <task number>`

Example:

`mark 2`

Expected outcome:

```text
Nice! I've marked this task as done:
[D][X] return book (by: June 6th)
```

### Unmarking a task: `unmark`

Marks a task as not done.

Format:

`unmark <task number>`

Example:

`unmark 2`

Expected outcome:

```text
OK, I've marked this task as not done yet:
[D][ ] return book (by: June 6th)
```

### Deleting a task: `delete`

Removes a task from the list.

Format:

`delete <task number>`

Example:

`delete 1`

Expected outcome:

```text
Noted. I've removed this task:
[T][ ] read book
Now you have X tasks in the list.
```

### Finding tasks: `find`

Finds tasks whose descriptions contain a given keyword.

Format:

`find <keyword>`

Example:

`find book`

Expected outcome:

```text
Here are the matching tasks in your list:
1.[T][ ] read book
2.[D][ ] return book (by: June 6th)
```

### Exiting the program: `bye`

Exits the application.

Format:

`bye`

Example:

`bye`

Expected outcome:

```text
Bye. Hope to see you again soooon!
```

## Notes

- Task numbering is 1-based.
- Tasks are loaded from and saved to `./data/duke.txt`.
- The task list is saved when the program exits with `bye`.
- `find` performs substring matching on task descriptions.
- `find` is case-sensitive because it matches the stored task text directly.
34 changes: 34 additions & 0 deletions src/main/java/Deadline.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* Represents a task with a deadline.
*
* Deadline object contains information about a task that has a deadline,
* including its description and the date by which it should be completed.
*
* @param description the description of the task
* @param by the deadline of the task
* @return a Deadline object representing the task with the specified description and deadline
* @throws DukeException if there is an error in processing the task
*/
public class Deadline extends Task {
protected String by;

public Deadline(String description, String by) {
super(description);
this.by = by;
}

public Deadline(String description, String by, boolean isDone) {
super(description, isDone);
this.by = by;
}

@Override
public String toFileString() {
return "D | " + (isDone ? 1 : 0) + " | " + description + " | " + by;
}

@Override
public String toString() {
return "[D]" + getStatusIcon() + " " + description + " (by: " + by + ")";
}
}
Loading