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

Alex Setyawan iP #476

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

Conversation

alex-setyawan
Copy link

@alex-setyawan alex-setyawan commented Feb 7, 2024

AWEX

"When in doubt, look intelligent." - Garrison Keillor

And that is exactly what using AWEX allows you to do! Why record tasks using a notepad or a calendar, when you can painstakingly download a rudimentary project from online, that provides the exact same functionality?

Notepad? Boring. Overused. Plain.

Chatbot? Cool. Fancy. Sexy.

AWEX (A Wonderful EXperience) revolutionises the way we construct our to-do lists, being

  • text-based
  • easy to learn
  • entertaining to watch,

and letting you,

  • create tasks
  • delete tasks
  • find tasks

unlike ANY other productivity app! 😱

All you need to do is:

  1. Wait for me to finish it.
  2. Explore various better alternatives in the meantime.

Want to see how we make our tasks? Here's a sneak peek of our Task class!

public class Task {
    private String what;
    private String status;
    private String type;
    .
    .
    .
}

damithc and others added 13 commits January 7, 2024 18:33
Let's tweak the docs/README.md (which is used as the user guide)
to fit Duke better. Specifically,

1. mention product name in the title
2. mention adding a product screenshot and a product intro
3. tweak the flow to describe feature-by-feature
@alvislowyh
Copy link

Add code descriptions and change method names such as.. message() to displayMessage?

Copy link

@Jajared Jajared left a comment

Choose a reason for hiding this comment

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

Overall good use of OOP principles and general adherence to coding standards. Some improvements and refactoring can be done to clean up the code and improve readability. Keep up the good work!

import java.util.*;

public class Awex {
public static void message() {
Copy link

Choose a reason for hiding this comment

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

Good abstraction of the message to display the list of commands available. Perhaps a better and more specific variable name could be used here to describe this function? For example you could rename it to: listAllCommands()


public static void main(String[] args) {
System.out.println("Hello! I'm AWEX!\nWhat can I do for you?");
LinkedList<Task> list = new LinkedList<>();
Copy link

Choose a reason for hiding this comment

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

Any reason why a LinkedList is used instead of an ArrayList? Indeed a LinkedList works similar to an ArrayList, although their use cases may vary depending on the scenario. Here is some research that I did: ArrayList vs LinkedList

@@ -0,0 +1,130 @@
import java.util.*;
Copy link

Choose a reason for hiding this comment

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

Perhaps you could try to avoid the use of wildcard imports here as it could lead to import conflicts.

Scanner sc = new Scanner(System.in);
String next = sc.nextLine();
String[] arr = next.split(" ");
while (!next.equals("bye")) {
Copy link

Choose a reason for hiding this comment

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

Good use of if-else statements to check and parse inputs! However, perhaps you could abstract out this method and also do consider using switch-case statements to improve performance.

@@ -0,0 +1,12 @@
public class DeadlineTask extends Task {
Copy link

Choose a reason for hiding this comment

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

Good use of inheritance!

alex-setyawan and others added 25 commits February 14, 2024 19:19
Currently, all logic of command identification is done in Awex.getResponse() method

This leads to getResponse being long and confusing, leading to potential bugs

Abstracting each if-else block in the current getResponse method helps for better
readability, as well as ease in narrowing down sources of bugs.
Currently, users always get the instruction message if they type erroneous inputs,
regardless if they know how to rectify them.

As the instruction message is long, it runs the risk of clogging the conversation space.

So a message directing the user to type "help" for full instructions is made,
so the user can get advice only when he/she needs it.
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.

4 participants