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

[Chew Cheng Yap] iP #42

Open
wants to merge 71 commits into
base: master
Choose a base branch
from
Open

Conversation

CodyChew
Copy link

No description provided.

damithc and others added 30 commits July 23, 2020 23:27
-skeletal version of Dukenizer chatbot
-Included echoing of commands and exits when user types "bye"
-Add items into a list
-display list when called
-added task class
-show active/done tasks
-Included Todo, Event and Deadline Class
-Each task are labeled with the starting alphabet
Included runtest.bat
-now checks for tick/cross correctly
-Additional method to throw DukeException while checking instruction line
-todo, deadline, event cannot be empty
-done must have more than 1 argument separated with space, is number specified cannot be more than Task list
-Many more exceptions have yet to be implemented
-All exceptions are handled when parsing the instruction
-leading and trailing white spaces are stripped for every line

following commands:
list:
-checks for no other inputs, (only "list")

done:
-checks for more than 1 input separated by space
-checks for second input being a valid number and in the following format 'done <item number>'

todo:
-checks for no other inputs, (only "todo")

deadline:
-checks for 'deadline <description> /by <time>' format

event:
-checks for 'event <description> /at <time>' format
-added delete task from list
-delete exceptions uses same checks as done exceptions
-shifted execution of instruction out of main method into read instruction method
-separated delete and done logic for more customisations in the future
Let's write to a relative file path to a text file Dukenizer.txt. Every
time the list updates, the file is written again.

This is to easily get the full list string everytime the list is updated
without having to process line by line when writing to the file.
Represent DataTime as an object rather than a string for manipulation.

Let's store a LocalDateTime obejct for the Deadline and Event task.

Able to format its output easily.

Reference to validation for correct dates and time format
https://stackoverflow.com/questions/2149680/regex-date-format-validation-on-java
https://www.geeksforgeeks.org/how-to-validate-time-in-24-hour-format-using-regular-expression/
# Conflicts:
#	src/main/java/Duke.java
…lasses

Classes have closely related code can be extracted into a single class.
It reduces the complexity of viewing things.

Ui class: deals with interactions with the user.

Storage class: deals with loading tasks from the file and saving tasks
in the file.

Parser class: deals with making sense of the user command.

TaskList class: contains the task list. It has operations to manipulate
tasks in the list and get data from it.

Command class: abstract Command class to allow us to use polymorphism
when dealing with different commands
Organize class types into packages for easier management

packages:
-Duke
-Duke.command
-Duke.exception
-Duke.parser
-Duke.storage
-Duke.task
-Duke.ui
Give users a way to find a task from its description with a search term.

Let's add a FindCommand class and updated Parser to accomodate find
command keyword.
# Conflicts:
#	src/main/java/duke/command/ListCommand.java
#	src/main/java/duke/storage/Storage.java
# Conflicts:
#	src/main/java/duke/command/FindCommand.java
Task done attribute makes use of UTF-8 encoding for task description.

Let's configure Gradle compiler encoding to 'UTF-8'.

Refer to article on setting UTF-8 properly in gradle:
https://www.thetopsites.net/article/58616121.shtml
Refer to this discussion on setting up UTF-8 to gradle:
nus-cs2103-AY2021S1/forum#95
CodyChew and others added 30 commits September 9, 2020 15:50
# Conflicts:
#	src/main/java/duke/task/TaskList.java
Refactor code to improve code quality
JUnit tests are used in this project.
Able to add notes and delete notes in a separate note list.
help command enables users to view all available commands for
improved user experience.
Let's differentiate user's and Dukenizer's dialog box. User's box is
now blue while Dukenizer's box is yellow.
Remove logo in greeting message as there is inconsistent formatting.
Window size has increased and dialog box now has a consistent size
for better viewing.
Program now shuts down on exit command.

Let's return the exit message to the user and then delay for a while
before closing the window.

Refer to this documentation on the preferred way to terminate a JavaFX
Application:
https://docs.oracle.com/javase/8/javafx/api/javafx/application/Application.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants