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

[yyj-02] iP #17

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

[yyj-02] iP #17

wants to merge 66 commits into from

Conversation

yyj-02
Copy link

@yyj-02 yyj-02 commented Jan 18, 2023

Duke Ultra Pro Max

"Duke is your friend when you have no friends" - someone famous

Description

Duke Ultra Pro Max is a open source bleeding edge πŸ”ͺ, blazingly fast ⚑, highly interactive πŸ”₯, all-in-one πŸ“¦ task manager for all your needs.

We are crrently in Beta Mode so Duke Ultra Pro Max is FREE FOR ALL USAGE. We also welcome everyone to contribute!

Feature

  • Can add 3 different types of tasks, todo | deadline | event
  • Persistent storage with the help of your local storage
  • Easily find events happening on a certain day with on command
  • Intuitive search function with string matching using find command

Usage

  1. Go to Duke Ultra Pro Max v1.0 release link
  2. Download duke-v1.0.jar AT YOUR OWN RISK
  3. (IMPORTANT) Disable your Antivirus and Windows Defender
  4. Double click the jar file and let us steal your data
  5. Start managing your tasks

Remember to give us these details:

  • Full name
  • Date of birth
  • IC number
  • Residential address
  • Credit card information

Developer Guide

If you Java programmer, you can use it to practice Java too. Here's the main method:

public class Duke {
    public static void main(String[] args) {
        new Duke(<location of local storage file in string>).run();
    }
}

damithc and others added 30 commits July 31, 2022 17:20

import storage.TaskList;

public abstract class Command {

Choose a reason for hiding this comment

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

I like how you separated the code with an abstract class Command πŸ˜„

public String run(TaskList taskList) {
ArrayList<Task> taskOnQueryDate = new ArrayList<>(taskList.indexTask().stream().filter(task ->
(task instanceof Deadline && ((Deadline) task).daysToDeadline(this.queryDate) == 0) ||
(task instanceof Event && ((Event) task).daysToEvent(this.queryDate) == 0))

Choose a reason for hiding this comment

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

I like how you indented the lines here

Copy link

@anshumaantgi anshumaantgi left a comment

Choose a reason for hiding this comment

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

Overall a well-thought IP, I can see that you have structured the classes very well and inside packages. Good use of Java OOP and the language itself, maybe you can add some JavaDoc comments, otherwise looks good to me.

try {
String taskDescription = taskList.showTask(this.index).toString();
taskList.deleteTask(this.index);
return "Noted. I've removed this task:\n " + taskDescription + "\nNow you have " + taskList.countTask()

Choose a reason for hiding this comment

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

I like how you abstract commands under the abstract class .Seeing how each run statement return a string , maybe store that string in each command and make a output method , this was you abstract all you're outputs there and in the future if you;re output message changes you would not have to change the code .

Copy link
Author

Choose a reason for hiding this comment

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

Yeah considered that too and it would be easier for testing as well.

*/
public Command parse() throws UnknownCommandException, MissingArgumentException, InvalidArgumentException {
preprocess();
switch (this.requestType) {

Choose a reason for hiding this comment

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

I like how you used switch-case statements here

@@ -0,0 +1,125 @@
package storage;

import java.time.LocalDate;

Choose a reason for hiding this comment

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

Import statements could be more clearer, The ordering of import statements must be consistent. as stated in the coding guidelines. So maybe organise them by putting spaces between them .

import task.Deadline;
import task.Task;

public class DeadlineCommandTest {

Choose a reason for hiding this comment

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

test can follow this featureUnderTest_testScenario_expectedBehavior() according to guideline.

yyj-02 and others added 19 commits February 9, 2023 21:02
Added assetions where assumptions were made, mainly in the command package:

* Mark, Unmark, Delete: assert that index >= 0
* Todo, Deadline, Event: assert that task is not empty
Follow the coding standards more closely.

Did the following tasks:

* Add missing header comments
* Rearrange import statements
Added assertions for:

* out of index
* empty task
* Rearranged imports
* Refactored code
Amend code to follow code quality

Follow more SLAP principles and add more comments! πŸ‘€
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