-
Notifications
You must be signed in to change notification settings - Fork 101
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
[CS2113T-T09-1] Sherpass #4
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, but more can be added to the project in terms of diagrams and elaboration of different components
docs/DeveloperGuide.md
Outdated
Below is a sequence diagram of what happens | ||
as the user wishes to see the schedule (timetable) for 25th May 2022: | ||
|
||
![](images/showScheduleForADate.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image hard to see, will be better if you can use ref
docs/DeveloperGuide.md
Outdated
|
||
Sequence diagram for `Timer` when user starts and stops a timer: | ||
|
||
![TimerClassSD](https://user-images.githubusercontent.com/69501969/160768104-fa7e06e3-1be8-4387-b75d-ae4e79bca5b7.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is update command here a method? if so need to do the proper self invoke syntax, arrow itself, activate, unarrow itself, deactivate. Same as start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
### Study session | ||
|
||
Timetable component consists of `Timer`, `Stopwatch`, `Countdown`, `TimerParser`, `TimerLogic` and various commands. | ||
|
||
## Design & implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i suggest splitting design and implementation, where design can include stuff like architecture overview,class diagrams of the 4 major compnents above
docs/puml/showScheduleForADate.puml
Outdated
|
||
hide footbox | ||
|
||
participant User as User |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have changed a colour for sequence diagram under timetable implementation, which is good and its clear to the reader that it falls under a different category. However, for the sequence diagram under the storage implementation section, you are still using red, so this may be confuse the reader and defeats the purpose of having colours in diagrams.
#### Design considerations for Timer class | ||
- Current implementation: Create `Timer` from scratch, using the sleep function of threads to keep | ||
track of time | ||
- Pros: Same overhead of needing to track the time left of the timer | ||
- Pros: No need to follow Java’s `Timer` class syntax, which can be confusing at times | ||
- Pros: Implementation is simple and straight-forward | ||
- Cons: Have to manage how we interrupt the thread after stopping the timer | ||
- Alternative: Using Java's `Timer` class | ||
- Pros: The way of keeping track of the time has already been implemented | ||
- Pros: Using a standard library usually makes the program less prone to various errors | ||
- Cons: Still have to implement a way to keep track of time for our purposes of pausing a timer, since the library | ||
provided by Java has no way of pausing the timer, only stopping it. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
docs/puml/showScheduleForADate.puml
Outdated
hide footbox | ||
|
||
participant User as User | ||
participant Main as Main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diagram is hard to read, I suggest using ref and extract the interaction between Timetable and TaskList.
docs/DeveloperGuide.md
Outdated
- [Study Session Implementation](#study-session-implementation) | ||
- [Timetable Implementation](#timetable-implementation) | ||
- [Storage Implementation](#storage-implementation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest including the sub-headings as well, eg Timer Implementation, Study session usage scenario, Design considerations for Timer class to be under Study Session Implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good use of visuals and sufficient use of examples! Explanations are clear and concise and the overall flow is very coherent and readable. Nice job :)
docs/DeveloperGuide.md
Outdated
Below is a sequence diagram of what happens | ||
as the user wishes to see the schedule (timetable) for 25th May 2022: | ||
|
||
![](images/showScheduleForADate.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with sean, diagram is rather complicated and I think it would be better to use a reference frame and split this diagram into multiple diagrams to see each one clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following up from my comment of the previous diagram, the Main class seems to be reading the userInput?
docs/DeveloperGuide.md
Outdated
`Storage#load()` - Loads a saved JSON file and returns an ArrayList of task | ||
|
||
The path of the JSON file is provided as a parameter in the constructor of `Storage` hence | ||
there is no need for any parameters in the `Storage#load()`. Since a save file will be created in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there is a formatting error here or if it was intentional but why is there a # betwen Storage and its load() method? Is it supposed to be Storage.load() in this case?
docs/DeveloperGuide.md
Outdated
## Product scope | ||
### Target user profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/DeveloperGuide.md
Outdated
|
||
Sequence diagram for `Timer` when user starts and stops a timer: | ||
|
||
![TimerClassSD](https://user-images.githubusercontent.com/69501969/160768104-fa7e06e3-1be8-4387-b75d-ae4e79bca5b7.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since your project has a UI class, shouldn't the UI class be responsible for taking in the userInput instead of the StudyCommand class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saw the rest of the diagrams, I noticed a little bit of inconsistency here whereby StudyCommand takes in userInput for this diagram, but for the other diagram it is Main, and for another diagram it is the UI class
docs/DeveloperGuide.md
Outdated
|
||
![](images/StorageCorruptedSD.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following up on my comment on the previous diagram, the reading of userInput here is done by Ui class, perhaps would be better to standardize this across the other diagrams!
docs/DeveloperGuide.md
Outdated
### UI | ||
|
||
UI component consists the `Ui` class which manages interaction (receiving inputs and showing outputs) between the user | ||
and the application. | ||
|
||
### Storage | ||
|
||
Storage component consists `Storage` and `StorageParser` classes. | ||
`Storage` class handles loading, writing and saving | ||
data to and from a JSON file, such that users' data will be saved automatically. | ||
`StorageParser` class handles the | ||
parsing of JSON from the saved data file. | ||
|
||
### Timetable | ||
|
||
For components with more complicated use-cases (`Task` and `Timer`), we separate an extra Logic class to achieve better | ||
modularity, such that each class addresses a separate concern. | ||
|
||
Timetable component consists of `Timetable`, `Task`, `TaskList`, `TaskParser`, `TaskLogic` and various commands. | ||
|
||
### Study session | ||
|
||
Timetable component consists of `Timer`, `Stopwatch`, `Countdown`, `TimerParser`, `TimerLogic` and various commands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very clear overview of the 4 main components of the programme. Good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, the code is quite neat!
I have highlighted some potential issues that may need fixing.
My suggestion is for each of you to take ownership and fix the files that you guys wrote. That way, each of you can get credit for good code 😄
} | ||
|
||
/** | ||
* Accept parsed user input for by date, in proper format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accepts ...
same thing across the comments
|
||
public abstract class Command { | ||
|
||
public abstract void execute(TaskList tasks, Ui ui, Storage storage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method needs a header comment as it is an abstract method, meaning you are forcing someone else to provide an implementation, and they need to know what to implement
if (dayInput != null) { | ||
ui.showToUser("Here is the schedule you wanted:"); | ||
Timetable.showScheduleByDay(dayInput, taskList, ui); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good use of guard clause 👍
case "decemeber": | ||
case "dec": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would lead to problems where the user doesn't use 3-letter/full name, e.g., decem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be fine if we make the 3-letter form very clear in the user guide?
* Method is called when user chooses to enter Study mode. User is able to start, pause and stop a timer in Study | ||
* mode. Only one timer can be running at a time. User can leave Study mode by typing "leave". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't follow the standard for header comments
* Returns | ||
* Printed tasks applies to non-recurring tasks. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
violates convention
import seedu.sherpass.util.Ui; | ||
|
||
|
||
public abstract class Timer extends Thread { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All abstract methods in this class need header comments
public class ParserTest { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
Jun Lim ped fixes
2 tests are omitted from final build as they incur an error when run with other tests, but are able to run individually
# Conflicts: # src/main/java/seedu/sherpass/task/TaskList.java
https://github.com/BradenTeo/tp into branch-ClearExpiredOrDone
# Conflicts: # docs/UserGuide.md
Isaac v2.1 documentation
Yuzhong documentation
Daryl Fix typo
Braden Update PPP
Yuzhong documentation
Daryl Update PPP
Daryl Fix URL in PPP again
Jun Lim UG updates
Braden Update Quick Start
Braden Add page breaks to UG
Braden Fix page break for UG
No description provided.