-
Notifications
You must be signed in to change notification settings - Fork 236
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-F12-1] CardLI #47
base: master
Are you sure you want to change the base?
[CS2113T-F12-1] CardLI #47
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, great work on the Developer Guide and use of sequence diagrams to supplement your wordier sections. With a little bit of quick-fixes on the formatting, the whole Developer Guide will look fantastic!
docs/DeveloperGuide.md
Outdated
### Storage Component | ||
The Storage component: | ||
* Saves all the decks | ||
* Saves all the flashcards | ||
* Remembers which deck each flashcard belongs to | ||
* Saves the results of each test |
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 can consider adding a sequence diagram here to show how the data is loaded into the app and saved into the text files. This will help your users to understand more about how the data is safely saved, and also explain your earlier point in the Design section on "initializes the components in the correct sequence".
docs/DeveloperGuide.md
Outdated
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
![](assets/Cards_CardLI.txt%20Example.png) | ||
</body> | ||
|
||
For the saving of the user's test history, the method call will expect an `ArrayList` of `AnswerList` objects along | ||
with a `type` argument of "tests". | ||
The `toString()` methods within the `AnswerList`and `Answer` classes have been overridden as per the specified format | ||
of saving the test history to the text file. | ||
For a `Answer` instance, the `toString()` method outputs a formatted string: `<answer> | <questionIndex>`. | ||
For a `AnswerList` instance, the `toString()` method also outputs a formatted string containing information | ||
about the test deck and the user's test score, on top of information on each of the user's answers for the test. | ||
An example of the format of the `Tests_CardLI.txt` where the decks of flashcards are saved is shown | ||
in the screenshot below. | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
![](assets/Tests_CardLI.txt%20Example.png) | ||
</body> | ||
|
||
|
||
`readCardsFromFile()` and `readTestsFromFile()` |
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
![class diagram](../docs/assets/testClassDiagram.png) | ||
|
||
Currently, test feature is implemented on a systemwide level and is handled by `TestManager`. | ||
`TestManager` will call on `TestUi` and `TestParser` to handle the inputs and outputs with the user | ||
and the parsing respectively during the test. | ||
|
||
![sequence diagram](../docs/assets/TestSequenceDiagram.png) | ||
|
||
To enter into test mode, the user needs to enter `test` in main menu in which the program will | ||
prompt the user to input a number corresponding to the index of the deck that they want to | ||
be tested on or "all" to test all decks. | ||
|
||
![sequence diagram](../docs/assets/getTestDeckSequenceDiagram.png) | ||
|
||
In both cases, `TestManager` will create an `AnswerList` using a `Deck` that it creates or gets from | ||
`DeckManager` depending on the condition which is shown by the sequence diagram above. | ||
If the user decides to test all decks, the program will compile all `FlashCard` into a `Deck`. If the user | ||
decides to test a single deck, the program will get that deck instance from `DeckManager`. | ||
The `AnswerList` is where the user's response to the test is stored, and it is made up | ||
of `Answer` as shown in the class diagram above. The `AnswerList` is also tagged with the test deck. | ||
|
||
![sequence diagram](../docs/assets/testAllCardsShuffledSequenceDiagram.png) | ||
|
||
After initializing the `AnswerList`, the testing begins. The `Deck` gets shuffled, then the cards (question) | ||
will be printed one at a time for the user to answer. The user's answer is then parsed and then added into | ||
the `AnswerList`. This process is repeated for the entire `Deck` that is being tested. | ||
|
||
![sequence diagram](../docs/assets/markTestSequenceDiagram.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.
Great choice to use sequence diagrams here, but it seems that the sequence diagrams are not appearing correctly in the GitHub Pages for your DG (as seen below).
You may want to consider removing ../docs/
from the image source in the code (e.g. assets/testClassDiagram.png
as the image link can be relative to where DeveloperGuide.md
is stored.
docs/DeveloperGuide.md
Outdated
|
||
Given below is the sequence diagram for `find`: | ||
|
||
![](assets/findFlashcardDiagram.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.
Good choice to add single-level numbering as it helps me to understand the sequence of which the calls flow. However, I personally am unsure if this is standard notation, and you may want to check if this is allowed. If it is, it's great help!
However, the image also appears quite small on your DG Page, and requires a few zoom-ins to read. If this is possible to adjust, it will definitely help the overall readability of your DG!
docs/DeveloperGuide.md
Outdated
|
||
`returnMatchingFlashCards()` is implemented by creating a stream that consists of all the `FlashCards` from one deck, and filters them based on whether they contain the search term given. Finally all the `FlashCards` that contain the search term are collected in an arrayList and their console outputs are returned in string format for `CardLiUi` to display to the user. | ||
|
||
Given below is the sequence diagram for `find`: |
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 may want to consider moving your sequence diagram for find
to below the header as that is where many will expect to find images related to a whole section (and to keep in line with the formatting of the rest of your DG, where their sequence diagrams are located below the header of that section).
docs/DeveloperGuide.md
Outdated
|
||
### `EditCardCommand` | ||
|
||
![](assets/editCardCommandSeqDiagram.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.
docs/DeveloperGuide.md
Outdated
|
||
### Move | ||
|
||
![](assets/moveCardCommandSeqDiagram.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.
docs/DeveloperGuide.md
Outdated
|
||
### Test Feature | ||
|
||
![class diagram](../docs/assets/testClassDiagram.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.
docs/DeveloperGuide.md
Outdated
|
||
How the parsing works: | ||
|
||
`Inner Parser` or `Outer Parser` creates a `XYZCommand` which in turn creates its corresponding `XYZCommandParser` (eg. when `InnerParser` creates a `EditCardCommand`, `EditCardCommand` creates a `EditCardParser`.)</li> |
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
3. The command communicates with the `Model` when it is executed (eg. to add a flashcard). | ||
4. The result of the command execution is encapsulated as a `CommandResult` object which is returned to the `UI` from `Logic` to process. | ||
|
||
![](assets/parserArchitectureDiagram.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.
docs/DeveloperGuide.md
Outdated
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list| | ||
| |user| add flashcards| | ||
| |user| delete flashcards| | ||
| |user| view my flashcards|know what cards I currenly have in the deck| | ||
| |user| test myself with my flashcards|know if I have memorised the flashcards correctly| |
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.
As from the syntax used, I think in this section your team was trying to put forward the information in tabular form. However there are some formatting issues which do not present in the tabular form. I have faced a similar issue before and I think its because too much information is being presented in one line.
You can consider making the points (which are presented on each line) to be short so that it fits well in the table and can be presented in tabular form.
@@ -1,29 +1,366 @@ | |||
# Developer Guide |
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
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the | ||
original source as well} | ||
|
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.
Perhaps your team can add something like a content page here containing hyperlinks to jump to each section of the DG? This might make navigating around the document easier.
docs/DeveloperGuide.md
Outdated
|
||
### Model Component | ||
|
||
![](assets/modelArchitectureDiagram.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.
docs/DeveloperGuide.md
Outdated
|
||
## Design & implementation | ||
![](assets/moveCardCommandSeqDiagram.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.
Having a sequence diagram here really helps to clear things up, however, unlike the previous diagrams, this one (and the next few) tends to have more content inside, and it is kind of hard for the reader to read, perhaps the size of the image can be enlarged?
On top of that, I think it was also mentioned by someone else as well: I believe that the lifeline of an object do not need to be drawn after the cross.
docs/DeveloperGuide.md
Outdated
@@ -1,29 +1,366 @@ | |||
# Developer Guide | |||
|
|||
# Introduction |
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 better for users to navigate around if you consider creating a
"table of contents" section with hooks (a.k.a. hyperlinks)?
docs/DeveloperGuide.md
Outdated
|
||
Given below is the sequence diagram for `edit` (Deck): | ||
|
||
![](assets/editDeckCommandSeqDiagram.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.
### `EditDeckCommand` | ||
|
||
|
||
Given below is the sequence diagram for `edit` (Deck): |
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
|
||
Given below is the sequence diagram for `find`: | ||
|
||
![](assets/findFlashcardDiagram.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.
More of a consistency issue, perhaps you could adjust the sequence diagrams for move, find, and editcardcommand to follow the same style. For instance, in object deletion, if you want to use the cross, consider using it for all your diagrams.
For the find sequence diagram in particular, well done in using the numbering, perhaps this could be replicated in the other diagrams as well. Also, "create" is used here, which again could be replicated in the other sequence diagrams if applicable.
You could also take an extra step by adding numbered steps in the explanation and adjusting it according to the numbers in the sequence diagram
returns `deck`, of string type, which represents the deck to be edited.`prepareMoveCommand()` will then return | ||
a string array, `preparedArguments`, which represents the arguments for the next method call. | ||
|
||
The `execute()` method will then call the `moveCard()` method of the `DeckManager` class, which in turn calls 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.
The sequence diagram explanation is detailed, to enhance it further, you could consider using bullet points to ease readers in understanding the thought process better.
docs/DeveloperGuide.md
Outdated
prompt the user to input a number corresponding to the index of the deck that they want to | ||
be tested on or "all" to test all decks. | ||
|
||
![sequence diagram](../docs/assets/getTestDeckSequenceDiagram.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.
docs/DeveloperGuide.md
Outdated
namely an `ArrayList` of a generic type `<T>` as well as a `boolean` value, `saveCards`, that indicates whether the method | ||
is saving cards or tests to their respective text files. | ||
|
||
![](assets/writeToFileSequenceDiagram.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.
Similar to the previous sequence diagrams, perhaps you could consider making your diagram styling more consistent.
docs/DeveloperGuide.md
Outdated
namely an `ArrayList` of a generic type `<T>` as well as a `boolean` value, `saveCards`, that indicates whether the method | ||
is saving cards or tests to their respective text files. | ||
|
||
![](assets/writeToFileSequenceDiagram.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.
docs/DeveloperGuide.md
Outdated
* Types fast | ||
* Prefers to store their information online rather than physically | ||
* Has a lot of flashcards | ||
|
||
|
||
### Value proposition |
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
|
||
Given below is the sequence diagram for `find`: | ||
|
||
![](assets/findFlashcardDiagram.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.
docs/DeveloperGuide.md
Outdated
CardLI is a Command Line Interface (CLI) desktop app designed to help students manage their flashcards. CardLI can help | ||
students keep track of all their flashcards. It also allows students to test their knowledge. All of this in one | ||
single platform. | ||
|
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.
Before the start of DG, it would be better to have a set of hyperlinks for user to navigate the whole DG.
returns `deck`, of string type, which represents the deck to be edited.`prepareMoveCommand()` will then return | ||
a string array, `preparedArguments`, which represents the arguments for the next method call. | ||
|
||
The `execute()` method will then call the `moveCard()` method of the `DeckManager` class, which in turn calls 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.
In this part can consider to use FUNCTION_NAME
to make the long paragram more clearer.
docs/DeveloperGuide.md
Outdated
|
||
### Test Feature | ||
|
||
![class diagram](../docs/assets/testClassDiagram.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.
docs/DeveloperGuide.md
Outdated
the method. | ||
|
||
![](assets/readTestsFromFileSequenceDiagram.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.
…mer not working properly in intellij
Edited find function to return error message when there are no cards matching the search term.
changed split parameters such that there needs to be a space after a flag
Fixed dg bugs and bugs from PED
Fix output when viewing a flashcard to accommodate long lines
Changed storage and test functionalities
Bug fixes for v2.1
Fixed bugs for EditDeck,EditCard,UG; Added Junit Testing for EditDeck,EditCard
final updates to dg
made diagrams smaller
Edit Countdown sequence diagram
Fix bug when adding command
added javadocs
Add Javadoc for CommandArgumentsParser class
sorted out authorship in ugdg. updated ppp
CardLI is a desktop app for creating, organising, and reviewing flashcards via a Command Line Interface to serve students.