Skip to content

Commit

Permalink
Fix issues within both guides
Browse files Browse the repository at this point in the history
  • Loading branch information
prokarius committed Oct 28, 2018
1 parent 8ce3d80 commit 9cdf1a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
18 changes: 7 additions & 11 deletions docs/DeveloperGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -628,16 +628,16 @@ When the user deletes a loan from the LoanBook, it deletes the correct loan, the
==== Proposed implementation:
From above, there is already a `LoanStatus` that has been implemented. What this does is that it allows the loan to be marked as deleted by setting the enum to the appropriate value. This would result in the LoanBook not needing to recommit every change.

From here, when the user decides to close the LoanBook, it will then loop through all the loans and filter out the ones which have no been delete. These are the loans that would be kept and saved in the LoanBook.
From here, when the user decides to close the LoanBook, it will then loop through all the loans and filter out the ones which have not been delete. These are the loans that would be kept and saved in the LoanBook.

==== Design Considerations
**Aspect: Deleting a loan**

* **Alternative 1 (current choice)**: we remove each loan as they are deleted
* **Alternative 1 (current choice)**: Remove each loan as they are deleted
** Pros: Easy to implement
** Cons: Large time taken for memory operations as reading and writing to the data is required.

* Alternative 2 (proposed implementation): Using an enum to implement lazy deletion.
* Alternative 2 (proposed implementation): Use an enum to implement lazy deletion.
** Pros: Much more time efficient due to lazy deletion
** Cons: Implementation is harder, and changing to this implementation would affect the undo and redo features.

Expand Down Expand Up @@ -794,8 +794,7 @@ e.g. `loanbook.logic.LogicManagerTest`

[WARNING]
====
The tests within the `add` command parsers do not
This is because of the time sensitive nature of the `add` command. It does not take in a specific `LoanTime` when the loan is created and populates the current system time into the `Loan`. Therefore, the strings that is returned for each command is time dependant. Hence it is impossible to do a string matching on the returned display string and a hard coded value.
The tests within the `add` command parsers do not take into account the feedback string from within the display. This is because of the time sensitive nature of the `add` command. It does not take in a specific `LoanTime` when the loan is created and populates the current system time into the `Loan`. Therefore, the strings that is returned for each command is time dependant. Hence it is impossible to do a string matching on the returned display string and a hard coded value.
In this case, we commented out the check for equality of the string from the `add` command in the GUI against the expected hard coded string.
====
Expand Down Expand Up @@ -1278,16 +1277,13 @@ Prerequisites: List all loans using the list command. Ensure there are multiple
Expected: The loan is returned successfully as well. The display message details that the loan has been deleted, and gives a suggestion for the cost price of the duration of the loan.

. Negative tests:
.. Test case: `return i/1` +
Expected: First loan from the list is marked as returned. Details of the returned loan shown in the status message. Timestamp in the status bar is updated. The values of the card on the left of the application has been changed to reflect the returning of the loan.

.. Test case: `return i/0` +
Expected: No loan is returned. Error details shown in the status message. Status bar remains the same.
Expected: No loan is returned. Error details shown in the status message, the message should say "the specified index is invalid" in this case. Status bar remains the same.
.. Other incorrect `return` commands to try:
... `return`
... `return x` (where `x` is larger than the list size)
... `return i/x` (where `x` is larger than the list size)
... `return i/aaa` (Where `aaa` is a string)
... `return y` (where `y` is a loan that has already returned). +
... `return i/y` (where `y` is the index of a loan that is not `ONGOING`). +

=== Summary functionality

Expand Down
8 changes: 3 additions & 5 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ For the loan at index 9, changes the customer to James Tan, who has the specifie

[NOTE]
====
We do not allow editing of the loan's start time or the return time because we want you to be able to use our application as an auditing tool. We hope that this would simplify your business. However, by allowing you to edit the start and end time, this would invalidate this application as an auditing tool.
We are currently looking into alternatives that would allow you to edit the start and end time though! Stay tuned for our announcement in LoanBook version 2.0!
We do not allow editing of the loan's start time or the return time because we want you to be able to use our application as an auditing tool. We hope that this can then simplify the management of your business.
====

=== Locating loans by key words: `search`
Expand Down Expand Up @@ -170,7 +168,7 @@ Set the password of the app to `n3wP4sS`.

What's the use of a LoanBook if you are unable to return the loans that you have? This is how you can do that! In fact, we see your pains trying to calculate the amount payable on a calculator, so we decided to help you out by doing all the number crunching for you.

Marks a loan as returned based on LOAN_INDEX and automatically prints out the amount payable. The amount payable will be prorated and rounded down to the nearest minute. +
This command marks a loan as returned based on LOAN_INDEX and automatically prints out the amount payable. The amount payable will be prorated and rounded down to the nearest minute. +

[TIP]
====
Expand Down Expand Up @@ -217,7 +215,7 @@ The difference between deleting all the loans and hard resetting the LoanBook is

Do you want to find out at a glance how much money your business has collected? Or maybe out of all the bicycles you have, how many are currently loaned out? Here's the command for you.

Show the total number of loans that are done and in progress. Also summarizes the loan status of each item, the number of times an object was loaned before.
This feature shows the total number of loans that are done and in progress. It also summarizes the loan status of each item, the number of times an object was loaned before.

The `summary` function would display the statistics of all your loans in the display box on the right of the application. There, you will find the following statistics:

Expand Down

0 comments on commit 9cdf1a9

Please sign in to comment.