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

[Qin Kai] iP #98

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ bin/

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

# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
44 changes: 44 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java application project to get you started.
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.10.2/userguide/building_java_projects.html in the Gradle documentation.
* This project uses @Incubating APIs which are subject to change.
*/

plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
}

repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}

dependencies {
// This dependency is used by the application.
implementation libs.guava
}

testing {
suites {
// Configure the built-in test suite
test {
// Use JUnit Jupiter test framework
useJUnitJupiter('5.10.3')
}
}
}

// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

application {
// Define the main class for the application.
mainClass = 'org.example.App'
}
14 changes: 14 additions & 0 deletions app/src/main/java/org/example/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This source file was generated by the Gradle 'init' task
*/
package org.example;

public class App {
public String getGreeting() {
return "Hello World!";
}

public static void main(String[] args) {
System.out.println(new App().getGreeting());
}
}
14 changes: 14 additions & 0 deletions app/src/test/java/org/example/AppTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* This source file was generated by the Gradle 'init' task
*/
package org.example;

import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

class AppTest {
@Test void appHasAGreeting() {
App classUnderTest = new App();
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
}
}
2 changes: 2 additions & 0 deletions data/duke.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
T |0 | read some books |
E |0 | meet gf | tuesday | wednesday
154 changes: 142 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,160 @@
# Duke User Guide

// Update the title above to match the actual product name
# Bro: Task Manager User Guide

// Product screenshot goes here

// Product intro goes here

Bro task manager is a simple and intuitive task management application that helps you track todos, deadlines, adn events. It keeps you organized with your schedule with ease of use and flexibility.


## Adding deadlines

// Describe the action and its outcome.

// Give examples of usage
This allow users to add tasks with a due date. This ensures that you can track time-sensitive tasks and be notified.



Example:

deadline return book /by Sunday

```
expected output
____________________________________________________________
Got it. I've added this task:
[D][ ] return book (by: Sunday)
Now you have 6 tasks in the list.
```

## Adding Todos

A **ToDo** is a task without any date or time attached to it.

Example:

todo borrow book

```
expected output
____________________________________________________________
Got it. I've added this task:
[T][ ] borrow book
Now you have 5 tasks in the list.
____________________________________________________________
```


## Adding events

An **Event** is a task that has a start and end time, making it ideal for tracking appointments or multi-day events.

Example:

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

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

```


## Listing all tasks

You can list all your tasks, including ToDos, Deadlines, and Events, to get an overview of what you need to do.

Example:

list

```
expected output
____________________________________________________________
Here are the tasks in your list:
1.[T][X] read book
2.[D][ ] return book (by: June 6th)
3.[E][ ] project meeting (from: Aug 6th 2pm to: 4pm)
4.[T][X] join sports club
5.[T][ ] borrow book
____________________________________________________________

```


## Deleting tasks

This feature allows users to delete tasks from the list, whether they are ToDos, Deadlines, or Events.

Example:

list

```
expected output
____________________________________________________________
Here are the tasks in your list:
1.[T][X] read book
2.[D][X] return book (by: June 6th)
3.[E][ ] project meeting (from: Aug 6th 2pm to: 4pm)
4.[T][X] join sports club
5.[T][ ] borrow book
____________________________________________________________

```

delete 3

```
expected output
____________________________________________________________
Noted. I've removed this task:
[E][ ] project meeting (from: Aug 6th 2pm to: 4pm)
Now you have 4 tasks in the list.
____________________________________________________________

```



## Saving tasks

The task list is automatically saved to the hard disk whenever there is a change in the list, and it is loaded when the chatbot starts up. The tasks are saved in a file, and the format of the saved file includes the task type, completion status, and task details.

The file can be saved as ./data/duke.txt in this format:

```
T | 1 | read book
D | 0 | return book | June 6th
E | 0 | project meeting | Aug 6th 2-4pm
T | 1 | join sports club
```




## Finding tasks

This feature allows users to search for tasks by a keyword, whether the task is a ToDo, Deadline, or Event.

Example: `keyword (optional arguments)`
Example:

// A description of the expected outcome goes here
find book

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

## Feature ABC
## Exiting

// Feature details
Simply type "Bye" to exit the program.


## Feature XYZ

// Feature details
6 changes: 6 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties

org.gradle.parallel=true
org.gradle.caching=true

8 changes: 8 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
guava = "33.2.1-jre"

[libraries]
guava = { module = "com.google.guava:guava", version.ref = "guava" }
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading