ianyong / ip Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nus-cs2103-ay2021s1/ip
A Task Management Personal Assistant Chatbot
Home Page: https://ianyong.github.io/ip/
This project forked from nus-cs2103-ay2021s1/ip
A Task Management Personal Assistant Chatbot
Home Page: https://ianyong.github.io/ip/
Save the tasks in the hard disk automatically whenever the task list changes. Load the data from the hard disk when Duke starts up. You may hard-code the file name and location e.g., [project_root]/data/duke.txt
The format of the file is up to you. Example:
T | 1 | read book
D | 0 | return book | June 6th
E | 0 | project meeting | Aug 6th 2-4pm
T | 1 | join sports club
If you use file paths in your code,
C:\data
. If not, your app can cause unpredictable results when used in another computer.Your code must handle the case where the file doesn't exist at the start. Reason: when someone else takes your Duke and runs it for the first time, the required file might not exist in their computer. Similarly, if you expect the data file to be in as specific folder (e.g., ./data/
), you must also handle the 'folder does not exist yet' case.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#level-7-save.
Use the Streams feature of Java in your code, if applicable.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week5/project.html#a-streams.
Use assert
feature (not JUnit assertions) to document important assumptions that should hold at various points in the code.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week5/project.html#a-assertions.
Add JUnit tests to test the behavior of the code.
Requirements:
Refer to the JUnit tutorial @se-edu/guides to find how to use JUnit.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#a-junit.
Use Gradle to automate some of the build tasks of the project.
Refer to the Gradle tutorial @SE-EDU to learn how to use Gradle.
Gradle support is provided as a separate branch (named add-gradle-support
) in the Duke repo. Therefore, you can follow the scenario 2 in the above guide.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week4/project.html#a-gradle.
Implement a skeletal version of Duke that starts by greeting the user, simply echos commands entered by the user, and exits when the user types bye
.
Example:
____________________________________________________________
Hello! I'm Duke
What can I do for you?
____________________________________________________________
list
____________________________________________________________
list
____________________________________________________________
blah
____________________________________________________________
blah
____________________________________________________________
bye
____________________________________________________________
Bye. Hope to see you again soon!
____________________________________________________________
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week2/project.html#level-1-greet-echo-exit.
Tweak the code to comply with a given coding standard. From this point onward, ensure any new code added are compliant with the given coding standard.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#a-codingstandard.
Add the ability to store whatever text entered by the user and display them back to the user when requested.
Example:
____________________________________________________________
Hello! I'm Duke
What can I do for you?
____________________________________________________________
read book
____________________________________________________________
added: read book
____________________________________________________________
return book
____________________________________________________________
added: return book
____________________________________________________________
list
____________________________________________________________
1. read book
2. return book
____________________________________________________________
bye
____________________________________________________________
Bye. Hope to see you again soon!
____________________________________________________________
String[100]
) to store the items.Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week2/project.html#level-2-add-list.
Add a User Guide to the project. Here is one simple way to do it.
docs\README.md
. See this guide to GitHub flavored Markdown (GFMD).docs
folder (you can select a theme too).http://{your username}.github.io/{repo name}/
to view the user guide of your product. Note: it could take 5-10 minutes for GitHub to update the page.Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week6/project.html#a-userguide.
Use checkStyle to detect coding style violations.
Refer the tutorial Using Checkstyle @SE-EDU/guides to learn how to use Checkstyle.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week4/project.html#a-checkstyle.
Refactor the code to extract out closely related code as classes.
Minimal: Extract the following classes:
Ui
: deals with interactions with the userStorage
: deals with loading tasks from the file and saving tasks in the fileParser
: deals with making sense of the user commandTaskList
: contains the task list e.g., it has operations to add/delete tasks in the listFor example, the code of the main class could look like this:
public class Duke {
private Storage storage;
private TaskList tasks;
private Ui ui;
public Duke(String filePath) {
ui = new Ui();
storage = new Storage(filePath);
try {
tasks = new TaskList(storage.load());
} catch (DukeException e) {
ui.showLoadingError();
tasks = new TaskList();
}
}
public void run() {
//...
}
public static void main(String[] args) {
new Duke("data/tasks.txt").run();
}
}
Stretch Goal: Consider extracting more classes. e.g., *Command
classes (i.e., AddCommand
, DeleteCommand
, ExitCommand
etc.) that inherits from an abstract Command
class, so that you can write the main logic of the App as follows:
public void run() {
ui.showWelcome();
boolean isExit = false;
while (!isExit) {
try {
String fullCommand = ui.readCommand();
ui.showLine(); // show the divider line ("_______")
Command c = Parser.parse(fullCommand);
c.execute(tasks, ui, storage);
isExit = c.isExit();
} catch (DukeException e) {
ui.showError(e.getMessage());
} finally {
ui.showLine();
}
}
}
You can get some inspiration from how the code of the addressbook-level2 is organized.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#a-moreoop.
Critically examines the code and refactor to improve the code quality where necessary.
When adding this increment, follow closely the 'Code Quality' topics you have learned so far, rather than merely follow your own intuition about code quality.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week5/project.html#a-codequality.
Teach Duke how to understand dates and times. For example, if the command is deadline return book /by 2/12/2019 1800
, Duke should understand 2/12/2019 1800
as 2nd of December 2019, 6pm, instead of treating it as just a String.
java.time.LocalDate
in your task objects. Accept dates in a format such as yyyy-mm-dd
format (e.g., 2019-10-15
) and print in a different format such as MMM dd yyyy
e.g., (Oct 15 2019
).Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#level-8-dates-and-times.
B-DoWithinPeriodTasks
or C-Sort
or D-Places
BCD-Extension
to the corresponding commit.Discuss with your team members to ensure that each member picks a different extension.
You may want to pick an extension that is relevant to your tP so that the code can be reused in the tP later.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week5/project.html#4-add-an-extension.
Organize the classes into suitable java packages.
duke
duke.task
, duke.command
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#a-packages.
Add a GUI to Duke. Use the JavaFX technology to implement the GUI.
Refer to the JavaFX tutorial @SE-EDU/guides to learn how to get started with JavaFX.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week4/project.html#level-10-gui.
Use GitHub Actions to set up Continuous Integration (CI).
The workflow specified by this .yml
file is a good candidate for this project. The last three segments are related to I/O redirection tests; can be deleted if not applicable to your project.
Refer to the Using GitHub Actions @SE-EDU/guides to learn how to use that .yml
file to set up GitHub actions.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week5/project.html#a-ci.
Use Java varargs feature, if applicable.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week4/project.html#a-varargs.
Add JavaDoc comments to the code.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#a-javadoc.
Add support for tracking three types of tasks:
Example:
todo borrow book
____________________________________________________________
Got it. I've added this task:
[T][✗] borrow book
Now you have 5 tasks in the list.
____________________________________________________________
list
____________________________________________________________
Here are the tasks in your list:
1.[T][✓] read book
2.[D][✗] return book (by: June 6th)
3.[E][✗] project meeting (at: Aug 6th 2-4pm)
4.[T][✓] join sports club
5.[T][✗] borrow book
____________________________________________________________
deadline return book /by Sunday
____________________________________________________________
Got it. I've added this task:
[D][✗] return book (by: Sunday)
Now you have 6 tasks in the list.
____________________________________________________________
event project meeting /at Mon 2-4pm
____________________________________________________________
Got it. I've added this task:
[E][✗] project meeting (at: Mon 2-4pm)
Now you have 7 tasks in the list.
____________________________________________________________
At this point, dates/times can be treated as strings; there is no need to convert them to actual dates/times.
Example:
deadline do homework /by no idea :-p
____________________________________________________________
Got it. I've added this task:
[D][✗] do homework (by: no idea :-p)
Now you have 6 tasks in the list.
____________________________________________________________
When implementing this feature, you are also recommended to implement the following extension:
Todo
, Deadline
and Event
classes to inherit from a Task
class.Task
objects e.g., Task[100]
.Use the input/output redirection technique to semi-automate the testing of Duke.
Notes:
text-ui-test
folder).Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week2/project.html#a-textuitesting.
Add the ability to mark tasks as done.
Example:
list
____________________________________________________________
Here are the tasks in your list:
1.[✓] read book
2.[✗] return book
3.[✗] buy bread
____________________________________________________________
done 2
____________________________________________________________
Nice! I've marked this task as done:
[✓] return book
____________________________________________________________
When implementing this feature, you are also recommended to implement the following extension:
Task
class to represent tasks.Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week2/project.html#level-3-mark-as-done.
Add support for deleting tasks from the list.
Example:
list
____________________________________________________________
Here are the tasks in your list:
1.[T][✓] read book
2.[D][✓] return book (by: June 6th)
3.[E][✗] project meeting (at: Aug 6th 2-4pm)
4.[T][✓] join sports club
5.[T][✗] borrow book
____________________________________________________________
delete 3
____________________________________________________________
Noted. I've removed this task:
[E][✗] project meeting (at: Aug 6th 2-4pm)
Now you have 4 tasks in the list.
____________________________________________________________
When implementing this feature, you are also recommended to implement the following extension:
ArrayList<Task>
to store the tasks.Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week2/project.html#level-6-delete.
Improve the GUI to make it more polished. Some examples:
You can take inspiration from these past projects. If you adopt any ideas from them, don't forget to give credit to the original author.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week6/project.html#a-bettergui.
Use Java enums, if applicable.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week2/project.html#a-enums.
Use the Lambdas feature of Java in your code, if applicable.
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week5/project.html#a-lambdas.
Teach Duke to deal with errors such as incorrect inputs entered by the user.
Example:
todo
____________________________________________________________
☹ OOPS!!! The description of a todo cannot be empty.
____________________________________________________________
blah
____________________________________________________________
☹ OOPS!!! I'm sorry, but I don't know what that means :-(
____________________________________________________________
When implementing this feature, you are also recommended to implement the following extension:
DukeException
to represent exceptions specific to Duke.Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week2/project.html#level-5-handle-errors.
Give users a way to find a task by searching for a keyword.
Example:
find book
____________________________________________________________
Here are the matching tasks in your list:
1.[T][✓] read book
2.[D][✓] return book (by: June 6th)
____________________________________________________________
Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#level-9-find.
Package the app as an executable JAR file so that it can be distributed easily.
You can assume the user will run the jar file in the following way only:
java -jar {filename}.jar
e.g., java -jar Duke.jar
(i.e., run the command in the same folder as the jar file)Refer to the tutorial Working with JAR files @SE-EDU/guides to find how to create JAR files.
Do not commit the JAR file created. Instead, you can make the JAR file available in the following manner.
v0.1
Attach binaries by dropping them ...
.Refer to https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#a-jar.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.