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

[ananya21] iP #464

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

[ananya21] iP #464

wants to merge 24 commits into from

Conversation

ananya21
Copy link

@ananya21 ananya21 commented Feb 6, 2024

Project Charlie Enhancement 🚀

"Innovation distinguishes between a leader and a follower." - Steve Jobs

This PR introduces several enhancements to the Project Charlie, improving its performance and user experience. Here's what's new:

Features:

  • Enhanced Speed:
    • Now 50% faster than before!
  • New User Interface:
    • A sleek, modern UI for an improved user experience.

How to Get Started:

  1. Download the latest version from here.
  2. Install it by double-clicking the downloaded file.
  3. Enjoy the new and improved features!

What's Included in This PR:

public class Enhancements {
    public static void main(String[] args) {
        System.out.println("New Features Implemented!");
    }
}

Copy link

@wilsonwid wilsonwid left a comment

Choose a reason for hiding this comment

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

The code in this PR is of an overall good standard, even though there are several places where it could be improved. I commented on several coding standard violations, most of which are due to missing Javadoc comments. It would also be good to review the imports used in each of the classes to see whether they are unused.

@@ -0,0 +1,59 @@
import java.util.ArrayList;
import java.util.Scanner;

Choose a reason for hiding this comment

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

It would be good to add a Javadoc comment for the class, as well as the public methods inside the class.

@@ -0,0 +1,59 @@
import java.util.ArrayList;

Choose a reason for hiding this comment

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

It would be good to place all files in a package.

protected String description;
protected boolean isDone;

public Task(String description) {

Choose a reason for hiding this comment

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

It would be good to add Javadoc comments to public methods and to the class.

return (isDone ? "[X]" : "[ ]"); // mark done task with X
}

public void markAsDone() {

Choose a reason for hiding this comment

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

Could this method and markAsNotDone() perhaps be fused into one method with a boolean parameter?

}
@Override
public String toString() {
return "[T]" + super.toString();

Choose a reason for hiding this comment

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

I like how inheritance and polymorphism are used to shorten this line.

Copy link

@NusMinato NusMinato left a comment

Choose a reason for hiding this comment

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

No code naming issues found. Well done!

Ensure Task objects are in a consistent state

In our Task class, certain assumptions about the state of Task objects
hold true throughout the lifecycle of these objects (e.g., description
cannot be null). Previously, these assumptions were not explicitly
checked, leading to a risk of encountering NullPointerExceptions if
these assumptions ever got violated due to future changes.

Let's,
* add assertions to the constructor to ensure the description is not null
* add assertions in setStatus method to validate the state transitions

Adding these assertions helps catch bugs during the development phase
and ensures our assumptions about the Task object's state are always
validated.
Extract command initialization into dedicated methods

The Parser class's single-method approach for command parsing was
becoming cumbersome and difficult to maintain. This refactoring aims
to improve the code's readability and maintainability by adhering
to the Single Responsibility Principle.

Let's,
* Create separate methods for each command's parsing logic, such as
  , , etc.
* Ensure each method is responsible for a single aspect of the
  command parsing process.

This change not only makes the Parser class easier to understand
and modify but also simplifies adding new commands in the future.

By breaking down the complex  method into smaller, focused
methods, we improve the code quality significantly, making it
easier for future developers to navigate and extend the application.
Introduce the ability to assign priority levels to tasks, allowing users to
mark tasks with a specific priority. This enhancement enables more effective
task management by emphasizing the urgency or importance of certain tasks over others.

Modifications include:
- Update the Parser class to recognize priority commands and extract the relevant
  priority level from user input.
- Adjust the Duke class to handle the assignment of priority levels to tasks,
  storing this information accordingly.

This change addresses the need for users to organize their tasks by priority,
facilitating a more efficient and targeted approach to task management.

Priority levels are defined as high, medium, and low, corresponding to numeric
values for easy comparison. The implementation supports dynamic
adjustment of priorities, allowing users to update the priority level of tasks
as needed.
Enhance the User Guide in the README with detailed descriptions of new features

This update enriches the README file with a comprehensive guide to the application's features, improving user understanding and accessibility. The changes include:

- Detailed instructions on how to add todo, deadline, and event tasks, including how users are prompted for task prioritization.
- Explanation of the find keyword feature for locating tasks related to specific keywords.
- Guidelines on deleting tasks, listing all tasks, marking tasks as completed, and unmarking tasks.
- Usage examples for each command, providing clear scenarios that demonstrate the expected outcomes.

These enhancements aim to provide users with clear and concise instructions on utilizing the application's functionality to its full extent, promoting a more intuitive and user-friendly experience.

Additionally, the inclusion of expected outcomes for each command usage example serves to set clear expectations, aiding users in verifying the correct application behavior.
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.

3 participants