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

[CS2113T-T09-1] Sherpass #4

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

Conversation

jltha
Copy link

@jltha jltha commented Mar 3, 2022

No description provided.

Copy link

@SeanHoWB SeanHoWB left a 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

Below is a sequence diagram of what happens
as the user wishes to see the schedule (timetable) for 25th May 2022:

![](images/showScheduleForADate.png)

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


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)

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

Choose a reason for hiding this comment

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

image
what causes this? what happens here after the command is ran? Its abit unclear from the diagram


### Study session

Timetable component consists of `Timer`, `Stopwatch`, `Countdown`, `TimerParser`, `TimerLogic` and various commands.

## Design & implementation

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


hide footbox

participant User as User
Copy link

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.

Comment on lines +138 to +150
#### 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.

Copy link

Choose a reason for hiding this comment

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

Nice!

hide footbox

participant User as User
participant Main as Main
Copy link

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.

Comment on lines 8 to 10
- [Study Session Implementation](#study-session-implementation)
- [Timetable Implementation](#timetable-implementation)
- [Storage Implementation](#storage-implementation)
Copy link

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.

Copy link

@angyongming angyongming left a 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 :)

Below is a sequence diagram of what happens
as the user wishes to see the schedule (timetable) for 25th May 2022:

![](images/showScheduleForADate.png)

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.

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?

Comment on lines 238 to 241
`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

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?

Comment on lines 276 to 277
## Product scope
### Target user profile

Choose a reason for hiding this comment

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

Take note that there is a minor formatting error here:
image


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)

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?

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


![](images/StorageCorruptedSD.png)

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!

Comment on lines 36 to 58
### 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.

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!

Copy link
Contributor

@okkhoy okkhoy left a 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.
Copy link
Contributor

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);
Copy link
Contributor

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

Comment on lines +58 to +62
if (dayInput != null) {
ui.showToUser("Here is the schedule you wanted:");
Timetable.showScheduleByDay(dayInput, taskList, ui);
return;
}
Copy link
Contributor

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 👍

Comment on lines 161 to 162
case "decemeber":
case "dec":
Copy link
Contributor

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

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?

Comment on lines 23 to 24
* 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".
Copy link
Contributor

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

Comment on lines 460 to 462
* Returns
* Printed tasks applies to non-recurring tasks.
*
Copy link
Contributor

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 {
Copy link
Contributor

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

src/main/java/seedu/sherpass/timer/TimerLogic.java Outdated Show resolved Hide resolved
src/main/java/seedu/sherpass/timetable/Timetable.java Outdated Show resolved Hide resolved
Comment on lines 3 to 4
public class ParserTest {
}
Copy link
Contributor

Choose a reason for hiding this comment

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

??

thedarie and others added 25 commits April 8, 2022 17:43
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
# Conflicts:
#	docs/UserGuide.md
laiisaac and others added 30 commits April 11, 2022 22:29
Daryl Fix URL in PPP again
1) Fix typo
2) Update release link
3) Add definition to terminal
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.

9 participants