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

Refactor Task class and its dependencies to match current version #226

Conversation

michael-setia
Copy link
Collaborator

@michael-setia michael-setia commented Oct 15, 2020

Fixes #213

Added the Task class that will represent the task in the TodoList.

  1. New file added :
  • Task class
  • Date class
  • Priority class (enum)
  • Type class (will be replaced with tags in the future)
  • TaskName class
  • Status class (enum)
    ------ [updated 17/10/2020] -------
  1. The following files have also been added (taken from future PR) since I just realized they are also the base classes for TodoList:
  • DateComparator class
  • TaskComparatorByDate class
  • TaskComparatorByName class
  • TaskComparatorByPriority class
  • TaskNameComparator class
  • Criterion enum
  1. The following files are updated:
  • TaskName class:

    • isSameTaskName() method. It now ignores the case for the string compared (uppercase or lowercase is the same)
  • Priority class:

    • Added message constraints
    • Added isValid() method() [not used at the moment]

@michael-setia michael-setia added type.Task Something that needs to be done, but not a story, bug, or an epic. priority.High Must do type.code A piece of code to be used labels Oct 15, 2020
@michael-setia michael-setia added this to the V1.3 milestone Oct 15, 2020
@michael-setia michael-setia self-assigned this Oct 15, 2020
@michael-setia michael-setia changed the title Refactor Task classes to match current version Refactor Task class and its dependencies to match current version Oct 15, 2020
@codecov-io
Copy link

codecov-io commented Oct 15, 2020

Codecov Report

Merging #226 into master will decrease coverage by 1.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #226      +/-   ##
============================================
- Coverage     21.50%   20.46%   -1.05%     
  Complexity      300      300              
============================================
  Files           178      190      +12     
  Lines          2734     2873     +139     
  Branches        227      242      +15     
============================================
  Hits            588      588              
- Misses         2105     2244     +139     
  Partials         41       41              
Impacted Files Coverage Δ Complexity Δ
.../main/java/seedu/address/model/task/Criterion.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
src/main/java/seedu/address/model/task/Date.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...c/main/java/seedu/address/model/task/Priority.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
src/main/java/seedu/address/model/task/Status.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
src/main/java/seedu/address/model/task/Task.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...c/main/java/seedu/address/model/task/TaskName.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
src/main/java/seedu/address/model/task/Type.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../address/model/task/comparator/DateComparator.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ss/model/task/comparator/TaskComparatorByDate.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ss/model/task/comparator/TaskComparatorByName.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8021930...7ba897f. Read the comment docs.

Copy link
Collaborator

@jonasngs jonasngs 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 is readable and understandable. Apart from a few missing javadocs, it looks good to merge.

src/main/java/seedu/address/model/todolist/TaskName.java Outdated Show resolved Hide resolved
src/main/java/seedu/address/model/todolist/Type.java Outdated Show resolved Hide resolved
src/main/java/seedu/address/model/todolist/Task.java Outdated Show resolved Hide resolved
@michael-setia michael-setia merged commit 6498f91 into AY2021S1-CS2103T-F12-3:master Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.High Must do type.code A piece of code to be used type.Task Something that needs to be done, but not a story, bug, or an epic.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TodoList: Refactor Task class and its dependencies
3 participants