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

[cydtseng] iP #136

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

[cydtseng] iP #136

wants to merge 63 commits into from

Conversation

cydtseng
Copy link

@cydtseng cydtseng commented Jan 23, 2023

Duke Project

Chatbots represent a new trend in how people access information, make decisions and communicate.” — Christie Pitts ( Verizon Ventures)

The Duke Project is a chatbot based todo list with the following features

  • Command-based input
  • Adding events, deadlines and todos
  • Showing list of tasks to do
  • All tasks saved locally

How to run:

  1. Download the release here.
  2. Run the jar file.
  3. Start adding tasks.
  4. Let Duke manage tasks for you! 🥳

Interactivity progress:

  • Text based UI
  • GUI with JavaFX

Entry point main of Duke program.

public static void main(String[] args) {
    new Duke().run();
}

damithc and others added 30 commits July 31, 2022 17:20
# Conflicts:
#	src/main/java/Deadline.java
#	src/main/java/Duke.java
#	src/main/java/Event.java
Copy link

@Jayanth-Balasubramanian Jayanth-Balasubramanian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except some minor nitpicks. Very clean code!


public static void saveTasksToFile(ArrayList<Task> taskList) {
try {
String toWrite = "";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little pedantic, but it might be better to use a noun for this String, such as tasksToWrite

public void testParseByeCommand(){
Assertions.assertTrue(parser.isByeCommand("bye"));
Assertions.assertTrue(parser.isByeCommand("bye "));
Assertions.assertTrue(parser.isByeCommand(" bye"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great that you're testing these edge cases!

public class Parser {
private final Stage stage;

public enum CmdType {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enum constants should be in SCREAMING_SNAKE_CASE

return userInput.split(" ")[0].equals(CmdType.find.name());
}

public String parseCommandWithResponse(String userInput) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method seems way too long. As a suggestion, perhaps you could break your method up into handleByeCommand, handleMarkCommand etc so it's easier to debug.

cydtseng and others added 17 commits February 9, 2023 11:21
For now, assertions have been added to the DialogBox class and the
Storage class.

The assertions are to check assumptions of non null imageviews and
dialogbox labels as well as storage file directory and saved task
file existence.

This was referenced in enabling assertions
https://se-education.org/guides/tutorials/intellijUsefulSettings.html
Update project with assertions enabled for intellij and gradle
Refactor some code that does not adhere to SLAP
Add help command to show all possible command formats for users
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

2 participants