diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index f4426f611..1aee2cade 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -15,10 +15,10 @@ - [PIN](#pin) - [Chart](#chart) - [Exceptions and Logging](#exceptions-and-logging) + - [User Stories](#user-stories) - [Product scope](#product-scope) - [Target user profile](#target-user-profile) - [Value proposition](#value-proposition) - - [User Stories](#user-stories) - [Non-Functional Requirements](#non-functional-requirements) - [Glossary](#glossary) - [Instructions for Testing](#instructions-for-testing) @@ -56,16 +56,31 @@ The high-level overview of the application is provided in the flowchart below as Design and Implementation has been broken down into the subsequent sections, each tagged for ease of reference: -* [UI and I/O](#ui-and-io) -* [Commands](#commands) -* [Storage](#storage) -* [Group and GroupList](#group-and-grouplist) -* [Member and MemberList](#member-and-memberlist) -* [Transaction and TransactionList](#transaction-and-transactionlist) -* [DateTime](#DateTime) -* [PIN](#pin) -* [Chart](#chart) -* [Exceptions and Logging](#exceptions-and-logging) +- [Developer Guide](#developer-guide) + - [Table of Contents](#table-of-contents) + - [Acknowledgements](#acknowledgements) + - [Design \& Implementation](#design--implementation) + - [UI and I/O](#ui-and-io) + - [Commands](#commands) + - [Storage](#storage) + - [Group and GroupList](#group-and-grouplist) + - [Member and MemberList](#member-and-memberlist) + - [Transaction and TransactionList](#transaction-and-transactionlist) + - [DateTime](#datetime) + - [PIN](#pin) + - [Chart](#chart) + - [Exceptions and Logging](#exceptions-and-logging) + - [User Stories](#user-stories) + - [Product scope](#product-scope) + - [Target user profile](#target-user-profile) + - [Value proposition](#value-proposition) + - [Non-Functional Requirements](#non-functional-requirements) + - [Glossary](#glossary) + - [Instructions for Testing](#instructions-for-testing) + - [Manual Testing](#manual-testing) + - [JUnit Testing](#junit-testing) + - [Text UI Testing](#text-ui-testing) + - [Future Enhancements](#future-enhancements) ### UI and I/O @@ -679,7 +694,7 @@ import longah.util.DateTime; import longah.util.Transaction; // In pareTransaction() method of the Transaction Class -// Check for the special prefix of date & time component while adding parsing user expression +// Check for prefix of date & time component while adding parsing user expression if (splitInput[0].contains("t/")) { String[] splitLenderTime = splitInput[0].split("t/", 2); ... @@ -831,21 +846,14 @@ This diagram shows the sequence when the user resets their PIN. Given below is an example usage scenario and how the PIN creation and authentication mechanism behaves at each step: -1. The user launches the application for the first time. The PINHandler initializes, loading the saved PIN and -authentication enabled status from the file. If no PIN exists, it prompts the user to create a new PIN. -2. The user creates a new 6-digit PIN using the createPin method. The entered PIN is hashed using SHA-256 before -saving it to the file. -3. The user enables authentication upon startup using the 'pin enable' command. The authenticationEnabled flag is set to True and saved to the file. -4. The user closes the application and relaunches it. The PINHandler loads the saved PIN and authentication -enabled status from the file again. -5. The user attempts to log in by entering their PIN. The authenticate method hashes the entered PIN and -compares it with the saved hashed PIN. If they match, the user is successfully authenticated. Otherwise, the user is denied access. -6. The user decides to reset their PIN by entering their current PIN and creating a new one using the resetPin -method. -7. The user disables authentication upon startup using the 'pin disable' command. The authenticationEnabled flag -is set to false and saved to the file. -8. The user relaunches the application, and authentication is no longer required since it has been disabled. -The user can proceed with the application and do any actions without entering a PIN. +1. PINHandler initialization loads the saved PIN and authentication enabled status from the file. If no PIN exists, prompt the user to create a new PIN. +2. User creates a new 6-digit PIN using the createPin method. The entered PIN is hashed using SHA-256 before saving it to the file. +3. User enables authentication upon startup using the 'pin enable' command. The authenticationEnabled flag is set to True and saved to the file. +4. The user closes the application and relaunches it. The PINHandler loads the saved PIN and authentication enabled status from the file again. +5. The user attempts to log in by entering their PIN. The authenticate method hashes the entered PIN and compares it with the saved hashed PIN.If they match, the user is successfully authenticated. Otherwise, the user is denied access. +6. The user decides to reset their PIN by entering their current PIN and creating a new one using the resetPin method. +7. The user disables authentication upon startup using the 'pin disable' command. The authenticationEnabled flag is set to false and saved to the file. +8. On relaunch, authentication is not required since it was disabled. The user can proceed with the application and do any actions without entering a PIN. Code Segment: ``` @@ -861,8 +869,6 @@ PINHandler.authenticate(); } ``` -
- Design Considerations Resetting PIN: The resetPin() method allows users to change their PIN by first verifying their current PIN. This adds @@ -902,8 +908,6 @@ The `Chart` class consists of the following components: distinguishes positive and negative balances and adds tooltips for enhanced user interaction. Additionally, it includes an annotation recommending a command for managing debts effectively. - - Usage Example Given below is an example usage scenario and how the Chart class behaves at each step: @@ -911,7 +915,9 @@ Given below is an example usage scenario and how the Chart class behaves at each 1. The user adds a few members to the group and performs transactions among them. 2. The user enters the 'chart' command to view the current balances of all members. -Code Segment + + +Code Segment: ``` // Prepare data List