Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8827424
Add level 0
RyanLing169 Feb 6, 2025
c62d74b
Add Level 1
RyanLing169 Feb 6, 2025
7422647
Add Level 2
RyanLing169 Feb 6, 2025
d164f48
Add Level 3
RyanLing169 Feb 7, 2025
4bd7b59
Coding Standards
RyanLing169 Feb 7, 2025
fcfc426
Level 4
RyanLing169 Feb 7, 2025
29ff363
Semi textUitesting
RyanLing169 Feb 14, 2025
91d2f2b
Semi textUitesting
RyanLing169 Feb 14, 2025
00f4451
Level 5 and 6
RyanLing169 Feb 21, 2025
6f02f0f
Level 5
RyanLing169 Feb 21, 2025
4157f4a
Merge pull request #1 from RyanLing169/branch-Level-5
RyanLing169 Feb 21, 2025
93616ad
Merge branch-Level-5 into master
RyanLing169 Feb 21, 2025
5070e39
Merge branch 'master' of https://github.com/RyanLing169/ip
RyanLing169 Feb 21, 2025
552fb55
Level 6
RyanLing169 Feb 21, 2025
1582fe9
Level 7
RyanLing169 Feb 21, 2025
bb92328
Merge branch-Level-6 into master
RyanLing169 Feb 21, 2025
166ad65
Merge branch-Level-7 into master
RyanLing169 Feb 21, 2025
6f2b3d9
A-JAR
RyanLing169 Mar 3, 2025
2f3ac2d
Fixed delete
RyanLing169 Mar 3, 2025
da97fd3
Ui Class
RyanLing169 Mar 4, 2025
07e13e1
More OOP
RyanLing169 Mar 4, 2025
4af619c
Level-8
RyanLing169 Mar 6, 2025
f2559eb
Level 9
RyanLing169 Mar 6, 2025
dc69860
JavaDoc
RyanLing169 Mar 13, 2025
a0a25ec
Merge pull request #2 from RyanLing169/branch-Level-8
RyanLing169 Mar 14, 2025
f086dc3
merge master onto branch level-9
RyanLing169 Mar 14, 2025
586f2d5
fix merge conflicts for merging master to branch
RyanLing169 Mar 14, 2025
f61a9e7
Merge pull request #3 from RyanLing169/branch-Level-9
RyanLing169 Mar 14, 2025
a1fd74b
Merge branch 'master' into branch-JavaDoc
RyanLing169 Mar 14, 2025
f408711
Merge pull request #4 from RyanLing169/branch-JavaDoc
RyanLing169 Mar 14, 2025
3dd6347
User Guide
RyanLing169 Mar 14, 2025
d5b7654
fix UG
RyanLing169 Mar 14, 2025
2f6142a
fix UG again
RyanLing169 Mar 14, 2025
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke project template
# TheGroad project template

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.

Expand All @@ -13,7 +13,7 @@ Prerequisites: JDK 17, update Intellij to the most recent version.
1. If there are any further prompts, accept the defaults.
1. Configure the project to use **JDK 17** (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.
1. 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:
1. After that, locate the `src/main/java/TheGroad.java` file, right-click it, and choose `Run TheGroad.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
____ _
Expand Down
1 change: 1 addition & 0 deletions data/TheGroad.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
T | 0 | many things
175 changes: 161 additions & 14 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,177 @@
# Duke User Guide
# TheGroad User Guide

// Update the title above to match the actual product name
```
_ _
(o\~~~/o)
\_ _/
(_ _)
\_._/

```


## Introduction
**The Groad** is a **task management chatbot** designed for users who enjoy **command-line interactions**. Let **The Groad** assist in managing your **to-dos, deadlines and events**, ensuring you stay on track for your goals.

---
## 📖Table of Contents
-[🚀 Getting started](#-getting-started)
- [🛠️ Features](#-features)
- [1️⃣ Adding Todos](#1-adding-todos-todo)
- [2️⃣ Adding Deadlines](#2-adding-deadlines-deadline)
- [3️⃣ Adding Events](#3-adding-events-event)
- [📋 Listing All Tasks](#4-listing-all-tasks-list)
- [✔️ Marking Tasks as Done](#5-marking-tasks-as-done-mark)
- [❌ Unmarking Tasks](#6-unmarking-tasks-as-incomplete-unmark)
- [🗑️ Deleting Tasks](#7-deleting-tasks-delete)
- [🔎 Finding Tasks](#8-finding-tasks-using-keyword-find)
- [🔚 Exiting the Application](#9-exiting-the-application-bye)

---
## 🚀 Getting Started
1. Ensure you have Java `17` or above installed on your computer.
2. Download the latest `.jar` from [here](https://github.com/prathisttam/ip/releases)
3. Copy the file to the folder you want to use as the home folder for your TaskList.
4. Open a command terminal, `cd` into the folder you put the jar file in and run the following:
```
java -jar ip.jar
```

## 🛠️ Features

> [!NOTE]
> Words enclosed within `<>` are placeholders for user input

### ️1️⃣ Adding todos: **`todo`**

**Syntax:** `todo <task description>`

Adds a new todo task to your list.

**Example:**
--------------------------------------------------------------
> todo Homework

```
Got it. I've added this task:
[T][ ] Homework
You have 1 tasks in the list
```
--------------------------------------------------------------

### 2️⃣ Adding deadlines: **`deadline`**

**Syntax** `deadline <task description> /by <date>`

**Example:**
--------------------------------------------------------------
> deadline project proposal /by April 27 2025

```
Got it. I've added this task:
[D][ ] project proposal (by: Apr 27 2025)
Now you have 2 tasks in the list.
```
--------------------------------------------------------------

### 3️⃣ Adding events: **`event`**

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

// Product screenshot goes here
**Example:**
--------------------------------------------------------------
> event hangout with friends /from 7pm /to 9pm

// Product intro goes here
```
Got it. I've added this task:
[E][ ] hangout with friends (from: 7pm to: 9pm)
You have 3 tasks in the list.
```
--------------------------------------------------------------

### 4. 📋 Listing all tasks: **`list`**

**Syntax** `list`

**Example:**
--------------------------------------------------------------
> list

```
1. [T][ ] Homework
2. [D][ ] project proposal (by: Apr 27 2025)
3. [E][ ] hangout with friends (from: 7pm to: 9pm)
```
--------------------------------------------------------------

### 5. ✔️ Marking tasks as done: **`mark`**

**Syntax** `mark <task index in list>`

**Example:**
--------------------------------------------------------------
> mark 1

```
Nice! I’ve marked task as done:
[T][X] Homework
```
--------------------------------------------------------------

### 6. ❌ Unmarking tasks as incomplete: **`unmark`**

## Adding deadlines
**Syntax** `unmark <task index in list>`

// Describe the action and its outcome.
**Example:**
--------------------------------------------------------------
> unmark 1

// Give examples of usage
```
OK, I've marked this task as not done yet:
[T][ ] Homework
```
--------------------------------------------------------------

Example: `keyword (optional arguments)`
### 7. 🗑️ Deleting tasks: **`delete`**

// A description of the expected outcome goes here
**Syntax** `delete <task index in list>`

**Example:**
--------------------------------------------------------------
> delete 1

```
expected output
Noted. I’ve removed this task:
[T][ ] Homework
Now you have 2 tasks in the list
```
--------------------------------------------------------------

## Feature ABC
### 8. 🔎 Finding tasks using keyword: **`keyword`**

// Feature details
**Syntax** `find <keyword>`

**Example:**
--------------------------------------------------------------
> find hang

## Feature XYZ
```
Here is a list of your tasks:
1. [E][ ] hangout with friends (from: 7pm to: 9pm)
```
--------------------------------------------------------------

### 9. 🔚 Exiting the application: **`bye`**

**Syntax** `bye`

**Example:**
____________________________________________________________
> bye

```
Bye. Hope to see you again soon!
Process finished with exit code 0
```

// Feature details
---
11 changes: 11 additions & 0 deletions src/main/java/CommandType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
public enum CommandType {
LIST,
MARK,
UNMARK,
TODO,
DEADLINE,
EVENT,
DELETE,
BYE,
FIND
}
47 changes: 47 additions & 0 deletions src/main/java/Deadline.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;


/**
* Represents a deadline task. A <code>Deadline</code> object corresponds to a Task
* represented by a description and a deadline the task is due by,
* e.g<code>homework,by tonight</code>
*/

public class Deadline extends Task {

protected LocalDate by;

/**
* Constructs a new instance of the Deadline class.
*
* @param description The information on what the task entails.
* @param by The deadline for this Deadline task.
*/

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

/**
* Converts the deadline task to the printing format.
*
* @return The Deadline in printing format.
*/
@Override
public String toString() {
return "[D]" + super.toString() + " (by: " + by.format(DateTimeFormatter.ofPattern("MMM d yyyy")) + ")";
}

/**
* Converts the deadline task to the saving/file format.
*
* @return The Deadline in saving/file format.
*/
public String toFileFormat() {
return "D | " + (isDone ? "1" : "0") + " | " + description + " | " + by;
}
}


10 changes: 0 additions & 10 deletions src/main/java/Duke.java

This file was deleted.

66 changes: 66 additions & 0 deletions src/main/java/Event.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/**
* Represents an Event type of the task class. An <code>Event</code> object corressponds
* to a task represented by a start date/time and an ending date/time
* e.g. <code>9pm, 6pm</code>
*
* Extends {@link Task} to provide additional functionality.
*/

public class Event extends Task {

protected String from;
protected String to;

/**
* Constructs an Event with a specified description, from and to date/time.
*
* @param description The details on what the event entails.
* @param from The starting date/time of the event.
* @param to The ending date/time of the event.
*/

public Event(String description, String from, String to) {
super(description);
this.from = from;
this.to = to;
}

/**
* Creates a new instance of {@link Event}.
*
* @param inputParts_1 The neccessary portion of the user input used to create the instance.
* @return A new instance of {@link Event}.
* @throws TheGroadException If the neccesary inputs are missing or invalid.
*/
public static Event of(String inputParts_1) throws TheGroadException {
if (!inputParts_1.contains("/from")) {
throw new TheGroadException("OOPS! The from portion of the EVENT cannot be empty!");
}
String[] eventPartsFrom = inputParts_1.split("/from");
if (!eventPartsFrom[1].contains("/to")) {
throw new TheGroadException("OOPS! The to portion of the EVENT cannot be empty!");
}
String[] eventPartsTo = eventPartsFrom[1].split("/to");
return new Event(eventPartsFrom[0].trim(), eventPartsTo[0].trim(), eventPartsTo[1].trim());
}

/**
* Converts the Event instance to printing format.
*
* @return The Event instance in printing format.
*/
@Override
public String toString() {
return "[E]" + super.toString() + " (from: " + from + " to: " + to + ")";
}

/**
* Converts the Event instance to saving/file format.
*
* @return The Event instance in saving/file format.
*/
public String toFileFormat() {
return "E | " + (isDone ? "1" : "0") + " | " + description + " | " + from + " | " + to;
}
}

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: TheGroad

Loading